Skip to content

Commit

Permalink
Merge pull request #10 from petschekr/master
Browse files Browse the repository at this point in the history
Fix infinite redirects caused by redirecting to URL without retry token
  • Loading branch information
joshAppDev authored Jun 19, 2018
2 parents ad0a883 + 3d02650 commit ef7d7d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/passport-cas.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ CasStrategy.prototype.authenticate = function(req, options) {
// `ticket` portion of the querystring remains after the
// session times out and the user refreshes the page.
// So remove the `ticket` and try again.
var url = req.originalUrl || req.url
var url = (req.originalUrl || req.url)
.replace(/_cas_retry=\d+&?/, '')
.replace(/([?&])ticket=[\w.-]+/, '$1_cas_retry='+token);
self.redirect(url, 307);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "passport-cas2",
"version": "0.0.9",
"version": "0.0.10",
"description": "CAS 2.0 strategy for Passport.js authentication",
"main": "./lib/index.js",
"scripts": {
Expand Down

0 comments on commit ef7d7d1

Please sign in to comment.