-
Notifications
You must be signed in to change notification settings - Fork 11
fix(auth): Encode/decode email in verification URL #37
Conversation
Pull Request Test Coverage Report for Build 233
💛 - Coveralls |
this looks beautiful: https://github.com/orbiting/republik-frontend/pull/101/files |
@patte Thought about it a bit more and find I do not fully comprehent what these implemented work-around methods do. But fair enough: It is not likely to change much overtime as it has a single purpose, does that one for us pretty neatly.
Hence going for first option. Bäm. |
1610317
to
90f5239
Compare
@patte Please revisit. |
@patrickvenetz please check the failing travis tests: |
It does conflict with servers/republik. Test setup in servers/republik does some magic node_modules symlinking. When faucet is installed, it comes with its own tape binary. faucet/tape however is not compatible with tape/tape.
Did revert installation of faucet comes with ancient a tape dependency. A combination of yarn's resolution, linking of packages and That ancient one does not support globbing (e.g. 💥 Good news: This can be straightened, with love and dedication (declaring packages, removing outside-the-box-attempts), but would like to not do so in this Merge Request. |
Habitus coding style
Ensures
email
query parameter in verification URL is encoded as base64 in an url-safe manner and ensuresemailFromQuery
inSession::sessionByToken()
is a plain string.URLs containin
email=<email>
oremail=<urlencoded email>
instead ofemail=<base64-encoded email>
let to double-encoding conflicts in some email clients, and resulted in URLs being invalid:heidi@wiese.tld
is encoded toheidi%40wiese.tld
(@
=>%40
). Some email clients would re-encode and generate a link withheidi%2540wiese.tld
(%
=>%25
).to be merged an deployed first.Deployed.Introduces urlsafe-base64 as a dependency.