Skip to content

Commit

Permalink
Base64 encoded query hashes in URLs are now separated by '.'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aklakan committed Nov 1, 2023
1 parent 7a4d573 commit b17e223
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ default String getStringId(HashIdCxt cxt) {
if (hash == null) {
hash = cxt.getHashAsString(this);
}
return prefix + "-" + hash.replace('/', '-');
// Note: Dot '.' is not part of base64 encoding
// This allows to use a hash as a path segment in an URL without introducing ambiguity
return prefix + "-" + hash.replace('/', '.');
}

/**
Expand Down

0 comments on commit b17e223

Please sign in to comment.