pmlopes / yoke

Yoke is a middleware framework for Vert.x
http://pmlopes.github.io/yoke/
Apache License 2.0
157 stars 44 forks source link

Signed cookie returns null #109

Closed timur-han closed 10 years ago

timur-han commented 10 years ago

Hi,

whenever a cookie is signed, i.e., starting with s:, the request fails. In YokeSecurity class the field val.equals(sign(str, mac)) of unsign method returns false and as a result null is returned. That means the sign method does not generate the same value in the second execution. Consequently, request returns a bad request and a silent stop is encountered without any error indication.

pmlopes commented 10 years ago

in order to keep the mac across instantiations you should provide a keystore file, this way yoke security picks the keys from the secure file and uses it on every instance.

timur-han commented 10 years ago

yes i agree, i somehow mistakenly opened the issue twice and thanks for the quick fixes