Skip to content

Commit

Permalink
handle cookies encoded, bad proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
awick committed Sep 17, 2023
1 parent 94178bf commit 2a5f729
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ NOTICE: Restart wiseService before capture when upgrading
NOTICE: Cross-cluster Shortcuts require you to not restart all your viewers at once after upgrading

4.5.1 2023/09/xx
- release - fix viewer systemd file
- all - handle cookies encoded, bad proxy

4.5.0 2023/09/13
- release - node 16.20.2
Expand Down
8 changes: 7 additions & 1 deletion common/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,15 @@ class Auth {

// ----------------------------------------------------------------------------
// Decrypt the auth string into an object
// IV.E.H
static auth2obj (auth, secret) {
// New json style
if (auth[0] === '{') { return Auth.auth2objNext(auth, secret); }

// New json style, but still encoded, bad proxy probably
if (auth.startsWith('%7B%22')) { return Auth.auth2objNext(decodeURIComponent(auth), secret); }

// Old style, IV.E.H

const parts = auth.split('.');

if (parts.length !== 3) {
Expand Down

0 comments on commit 2a5f729

Please sign in to comment.