Friday, November 6, 2009

Special Characters Introduce Special Bugs

Yesterday I was testing an application that demands its users to click on an activation link after creating a user ID and password to become a registered member of the website. All was going pretty well but suddenly it refused to activate a new member and displayed an error message of 'Activation link is invalid'.

I went through the link which consisted of an string at the end of URL that randomly generated for each user. This string sometimes made up of special characters too. After 15 minutes of brainstorming I got to know that (+) and (%) special characters were actually messing the process up. Whenever this randomize string contains these 2 characters, application was reluctant to activate the user successfully because:
  • (+) sign used to concatenate expressions in programming languages.
  • (%) sign used as a wildcard character in SQL and moreover if its immediately followed by a 2-digit hexadecimal character it denotes an octet specifying a character that might otherwise not be allowed in URLs.
And in my case randomize string was 'b%2C6np' and '%2C' is percent-encoding of comma (,) punctuation mark.
No doubt, it taught me a good lesson to learn.

|-- Quality lies in the eyes of customer --|

1 comment:

Carry on..Your comments cater me with the ingredients to bake this blog.