mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-08 09:48:05 +00:00
Feat: decode url-encoded user name in authenticate request header to allow CJK username in header (#7471)
* fix: CJK in header has to be urlEncoded * refactor: use $tw.utils.decodeURIComponentSafe * docs: about chagne in this field * docs: update * docs: use less "field"
This commit is contained in:
@@ -18,7 +18,7 @@ All parameters are optional with safe defaults, and can be specified in any orde
|
||||
* ''anon-username'' - the username for signing edits for anonymous users
|
||||
* ''username'' - optional username for basic authentication
|
||||
* ''password'' - optional password for basic authentication
|
||||
* ''authenticated-user-header'' - optional name of header to be used for trusted authentication
|
||||
* ''authenticated-user-header'' - optional name of request header to be used for trusted authentication.
|
||||
* ''readers'' - comma-separated list of principals allowed to read from this wiki
|
||||
* ''writers'' - comma-separated list of principals allowed to write to this wiki
|
||||
* ''csrf-disable'' - set to "yes" to disable CSRF checks (defaults to "no")
|
||||
|
||||
@@ -37,7 +37,7 @@ HeaderAuthenticator.prototype.authenticateRequest = function(request,response,st
|
||||
return false;
|
||||
} else {
|
||||
// authenticatedUsername will be undefined for anonymous users
|
||||
state.authenticatedUsername = username;
|
||||
state.authenticatedUsername = $tw.utils.decodeURIComponentSafe(username);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user