"25" added after "%"

Asked

Viewed 47 times

1

I created an HTML form that will send some parameters to a page, in this form has a parameter defined as Hidden which is the token.

The token has several "%" characters in the middle of it and I found that on the page where it returns the INVALID TOKEN error after submitting the form is added in the URL the number 25 after each of "%".

Has anyone ever caught that kind of trouble?

Follow an example:

<form action="url" method="get">
        <input type="hidden" name="token" value="676%anbh%akjk%31">
        <input type="text" name="nome">
        <input type="submit">
</form>

Has submitted the token 676%anbh%akjk%31 but the url is like url?token=676%25anbh%25akjk%2531 note that you have the number 25 after each %.

  • http://www.w3schools.com/tags/ref_urlencode.asp . I think you’re going to have to replace the "25" string with an empty string ''.

  • I do this in the code that receives the parameter?

  • 1

    @Laérciolopes this happens because the URL is not a good place to have special characters, many servers block these characters in the URL and the browser itself will interpret this URL and run one "urlencode" in it. And the way it works is precisely by adding % and the character code, for example %20 is the " (space). Additionally, because it is a Token, the minimum security would be send via POST, and probably implement a secure connection.

  • Got it, thanks a lot @Lucasqueirozribeiro.

  • 1

    That’s no problem, that’s right. %25 is the encoding of the symbol % - If the token is going incorrect, the problem is probably not there.

  • Got it, thanks a lot @Bacco.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.