using nodejs I am trying to generate an unique URL for user to conform email address. From that URL user will be able to verify the email account by decrypting the ciphertext and comparing ciphertext data with database . I am using CryptoJS to generate the url.
let url = 'http://localhost:4000/newUser/get/'+ciphertext ;
Problem is that in ciphertext, it contains forward slash " / " eg:
http://localhost:4000/newUser/get/U2FsdGVkX189ZNKKQrYgqU90DDwkl/W3hRTSGO1yvUMaDilPJmz9YYI3d1/E3i9C
Router is processing " / " on the URL, thus router is searching for the directory that is actually part of ciphertext. If there is any solution for not including " / " or special characters in ciphertext, please help. Thanks in advance.
You can easily replace the special characters with any of text like:
ciphertext.toString().replace('+','xMl3Jk').replace('/','Por21Ld').replace('=','Ml32');
Do not forget to replace these strings back with special characters
dataString.toString().replace('xMl3Jk', '+' ).replace('Por21Ld', '/').replace('Ml32', '=');
Hope this will help to solve your problem