Roda 3.80.0 Released #357
jeremyevans
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Roda 3.80.0 has been released!
New Features
The hmac_paths plugin now supports a :namespace option for both hmac_path and
r.hmac_path. The :namespace option makes the generated HMAC values unique
per namespace, allowing easy use of per user/group HMAC paths. This can
be useful if the same path will show different information to different
users/groups, and you want to prevent path enumeration for each user/group
(not allow paths enumerated by one user/group to be valid for a different
user/group). Example:
The HMAC path created with namespace: '1' will only be valid when calling
r.hmac_path with namespace: '1' (similar for namespace: '2').
It is expected that the most common use of the :namespace option is to
reference session values, so the value of each path depends on the logged in
user. You can use the :namespace_session_key plugin option to set the
default namespace for both hmac_path and r.hmac_path:
This will use
session['account_id']
(converted to a string) as the namespacefor both hmac_path and r.hmac_path, unless a specific :namespace option is
given, making it simple to implement per user/group HMAC paths across an
application.
Thanks,
Jeremy
Beta Was this translation helpful? Give feedback.
All reactions