From 402fe01127d64537c15bd04bea80b14bc568b78d Mon Sep 17 00:00:00 2001 From: Seth Wheeler Date: Mon, 1 Feb 2021 22:18:15 -0800 Subject: [PATCH] test --- lib/passport-cas.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/passport-cas.js b/lib/passport-cas.js index 4951b15..18d9fa7 100644 --- a/lib/passport-cas.js +++ b/lib/passport-cas.js @@ -178,19 +178,19 @@ CasStrategy.prototype.authenticate = function(req, options) { if (err) { var date = new Date(); var token = Math.round(date.getTime() / 60000); - if (req.query['_cas_retry'] != token) { - // There was a CAS error. A common cause is when an old - // `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) - .replace(/_cas_retry=\d+&?/, '') - .replace(/([?&])ticket=[\w.-]+/, '$1_cas_retry='+token); - self.redirect(url, 307); - } else { - // Already retried. There is no way to recover from this. - self.fail(err); - } + // if (req.query['_cas_retry'] != token) { + // // There was a CAS error. A common cause is when an old + // // `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) + // .replace(/_cas_retry=\d+&?/, '') + // .replace(/([?&])ticket=[\w.-]+/, '$1_cas_retry='+token); + // self.redirect(url, 307); + // } else { + // // Already retried. There is no way to recover from this. + // self.fail(err); + // } } // Validation successful