mikser-io 11.11.0 → 11.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/auth.js +21 -10
package/package.json
CHANGED
package/src/auth.js
CHANGED
|
@@ -136,17 +136,28 @@ export function reachabilityOf({ auth, token, allowRemote } = {}) {
|
|
|
136
136
|
// a non-ASCII password from a client that would otherwise send latin-1, which
|
|
137
137
|
// this server cannot match because it decodes the header as UTF-8.
|
|
138
138
|
//
|
|
139
|
-
//
|
|
140
|
-
// Windows WebDAV mini-redirector appears not to parse the parameter, and a
|
|
141
|
-
// challenge carrying it leaves a mapped drive unable to reconnect from stored
|
|
142
|
-
// credentials at all: before/after on a live deployment, with the parameter
|
|
143
|
-
// stripped at the proxy as the only variable, the client went from never
|
|
144
|
-
// sending an Authorization header to offering Basic unprompted. Interactive
|
|
145
|
-
// entry worked either way — that path sends Basic blind and never reads the
|
|
146
|
-
// challenge, which is the asymmetry that identified it.
|
|
139
|
+
// ON by default, which is where it started and where the evidence leaves it.
|
|
147
140
|
//
|
|
148
|
-
//
|
|
149
|
-
|
|
141
|
+
// It briefly defaulted off, on a report that stripping the parameter at the
|
|
142
|
+
// gate let a Windows client reconnect from stored credentials. That
|
|
143
|
+
// measurement did not hold: the improvement turned out to be a mapping
|
|
144
|
+
// reconnect being compared against an ad-hoc UNC access, and with the rewrite
|
|
145
|
+
// still in place the mount still fails. The third theory about that failure
|
|
146
|
+
// to look convincing and not survive contact.
|
|
147
|
+
//
|
|
148
|
+
// What is left is the RFC's own reason, and it points the other way. The
|
|
149
|
+
// clients that fail — the Windows mini-redirector and macOS WebDAVFS — both
|
|
150
|
+
// fail when replaying a credential from a STORE while a hand-typed one works,
|
|
151
|
+
// and a credential store is exactly where a non-ASCII password gets re-encoded
|
|
152
|
+
// on the way out. This server decodes the header as UTF-8, so a client that
|
|
153
|
+
// emits its platform codepage instead does not match. That is the case
|
|
154
|
+
// `charset` exists to prevent, so removing it is at best neutral and at worst
|
|
155
|
+
// the wrong direction.
|
|
156
|
+
//
|
|
157
|
+
// `charset: false` for a deployment that has measured a client which cannot
|
|
158
|
+
// parse the parameter. The point of the option is that this is a deployment's
|
|
159
|
+
// call, not that either answer is known to be right everywhere.
|
|
160
|
+
export function basicChallenge({ realm = 'mikser', charset = true } = {}) {
|
|
150
161
|
// A realm is a quoted-string, so a quote or a backslash inside one would
|
|
151
162
|
// end the field early and hand the rest to the parser as garbage. Cheap
|
|
152
163
|
// to prevent here, and impossible to prevent at five call sites.
|