231 append pseudorandom
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@
|
||||
|
||||
//variables.framework.docs={};
|
||||
variables.framework.docs.APIName="svc-api";
|
||||
variables.framework.docs.APIVersion="0.230"; /*$ git config --global --unset user.password*/
|
||||
variables.framework.docs.APIVersion="0.231"; /*$ git config --global --unset user.password*/
|
||||
|
||||
variables.framework.globalHeaders = structNew();
|
||||
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
|
||||
|
||||
@@ -122,14 +122,19 @@ component /*https://www.bennadel.com/blog/2976-trying-to-generate-cryptographica
|
||||
*/
|
||||
private string function encodeBytes( required binary bytes ) {
|
||||
|
||||
var token = binaryEncode( bytes, "base64" );
|
||||
var token = binaryEncode( bytes, "base64" ); // *** вот поэтому длина отличается от заявленной
|
||||
|
||||
// Replace the characters that are not allowed in the base64url format. The
|
||||
// characters [+, /, =] are removed for URL-based base64 values because they
|
||||
// have significant meaning in the context of URL paths and query-strings.
|
||||
token = replace( token, "+", "-", "all" );
|
||||
/*token = replace( token, "+", "-", "all" );
|
||||
token = replace( token, "/", "_", "all" );
|
||||
token = replace( token, "=", "", "all" );
|
||||
token = replace( token, "=", "", "all" ); */
|
||||
|
||||
// мы хотим убрать все спецсимволы, потому что мы используем токен в качестве псевдослучайного суффикса
|
||||
token = replace( token, "+", "a", "all" );
|
||||
token = replace( token, "/", "b", "all" );
|
||||
token = replace( token, "=", "c", "all" );
|
||||
|
||||
return( token );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user