Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove undesired character "=" appearing in signed_gid to_param result #104

Closed
wants to merge 2 commits into from

Conversation

formigarafa
Copy link

@formigarafa formigarafa commented Aug 17, 2017

SignedGlobalID#to_param currently may produce strings containing the character "=".
In the unsigned version to_param and parse removes and deals with their absence respectively making their us in url_params a straightforward experience.
The same does not happen with their signed counterpart which its use is encouraged for such cases.

Todo:

  • fix ;)

@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @jeremy (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

SignedGlobalID#to_param currently may produce strings containing the character "=".
In the unsigned version to_param and parse removes and deals with their absence respectively making their us in url_params a straightforward experience.
The same does not happen with their signed counterpart which its use is encouraged for such cases.
@formigarafa formigarafa force-pushed the friendly_signed_params branch from ab22de1 to acf9091 Compare August 18, 2017 00:13
use same to_param code by inheritance to produce signed version of it and make the parse method capable of understanding it.
@formigarafa
Copy link
Author

formigarafa commented Aug 18, 2017

@jeremy ,
this comment:

# remove the = padding character for a prettier param -- it'll be added back in parse_encoded_gid
led me to do this pull request. I overlook one detail in my use case and what seemed to be caused by url encoding issued was only a mistake on a test setup.
This pull request is not necessary to make it work, only make the urls "prettier" as the comment states by removing the %3D occurrences in the middle of the ActiveSupport::MessageVerifier generated string.

@formigarafa formigarafa changed the title test reproducing undesired character "=" appearing in to_param result remove undesired character "=" appearing in signed_gid to_param result Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants