URL encode SSB public keys on profile page #116
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix_encoding_decoding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces
/with%2Ffor all SSB public keys on the/scuttlebutt/profileroute.This addresses #91 and #96.
is there some type of encoding that we could use that would be more general than just replacing / with %2F , or is the only possible character that needs to be changed?
Otherwise looks good!
@notplants
The
/seemed to be the only character causing issues for the route handler so I went with the simplest solution.A more general approach would be to URL-encode the entire key. Here's an example:
@Sur8RwcDh6kBjub8pLZpHNWDfuuRpYVyCHrVo+TdA/4=.ed25519becomes...
%40Sur8RwcDh6kBjub8pLZpHNWDfuuRpYVyCHrVo%2BTdA%2F4%3D%2Eed25519One thing I like about the
/-only solution is that the key remains fairly readable and recognisable as an SSB ID. I'm tempted to stick with that solution and only implement the more complete encoding if we run into another issue.