javascript - get hash via url in nodejs -


i have reset password hash generated bcrypt...

hash = $2a$11$ro/y5gnki6v1dkewwzacbezy7q2a9872nugduxxes4j5swfeqghvg 

the problem hash have slash... in router

app.get('/gethash/:hash',routes.getresethash); 

i 404 error! think problem slash between $ro , y5g in hash because hash try search url this

app.get('/gethash/$2a$11$ro/y5gnki6v1dkewwzacbezy7q2a9872nugduxxes4j5swfeqghvg'..... 

how can stringify hash... ???

you want url escape hash. javascript has 2 functions encodeuri , encodeuricomponent... want latter since want encode single part of including slashes:

uri_safe_hash = encodeuricomponent(hash) 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -