231 append pseudorandom

This commit is contained in:
2026-04-21 11:57:53 +03:00
parent eef7a95d57
commit 808ff75d67
2 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -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";
+8 -3
View File
@@ -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 );