Is URL Encoding is required or send the data via Reqest Body?

Viewed 23

Have a password/some code or value which has plus value in the front and fails or missed out when it is sends as a request parameter in GET method in spring.

On analysis we observed we can solve the problem via the following:

  1. encode in front-end before goes to backend - (ex: Preserving + (Plus Sign) in URLEncoded Http Post request)
  2. encode in back-end before hitting the controller layer - (ex: extends ClientHttpRequestInterceptor and add functionality)
  3. convert the password to base64url in front-end and pass and do the base64 decode in the back-end
  4. send the password in request body instead of request parameter as plus is a keyword in browser which should be escaped
  5. send the hash value from front-end instead of actual value as hash will not have any plus or special characters and finally translate in back-end

Which one to go on the above?

Thanks

0 Answers
Related