URL encode SSB public keys on profile page #116
No reviewers
Labels
No Label
bug
documentation
duplicate
enhancement
help wanted
invalid
maintenance
peach-lib
peach-network
peach-oled
peach-stats
peach-web
question
refactor
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: PeachCloud/peach-workspace#116
Loading…
Reference in New Issue
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%2F
for all SSB public keys on the/scuttlebutt/profile
route.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=.ed25519
becomes...
%40Sur8RwcDh6kBjub8pLZpHNWDfuuRpYVyCHrVo%2BTdA%2F4%3D%2Eed25519
One 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.