Permalink
Browse files

fix(js): action token refresh now correctly replaces tokens in urls

  • Loading branch information...
jdalsem committed Mar 23, 2016
1 parent e052481 commit 7b4e0db2f8a1357e854a5a94c990e6b32683e12f
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/lib/security.js
View
@@ -24,8 +24,8 @@ elgg.security.setToken = function(json) {
// also update all links that contain tokens and time stamps
$('[href*="__elgg_ts"][href*="__elgg_token"]').each(function() {
this.href = this.href
- .replace(/__elgg_ts=\d*/, '__elgg_ts=' + json.__elgg_ts)
- .replace(/__elgg_token=[0-9a-f]*/, '__elgg_token=' + json.__elgg_token);
+ .replace(/__elgg_ts=\d*/i, '__elgg_ts=' + json.__elgg_ts)
+ .replace(/__elgg_token=[0-9a-z_-]*/i, '__elgg_token=' + json.__elgg_token);
});
};

0 comments on commit 7b4e0db

Please sign in to comment.