Skip to content

Commit

Permalink
#1189 more helpful exception when a license is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
derjoachim committed Dec 16, 2024
1 parent bf0561a commit fac6382
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- Tasks: fix several bugs in ICS import
- OAuth2 client: return more informative exception if a session variable is missing.

12-12-2024: 6.8.90
- Core: Show database error on upgrade
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public function callback()
if (!empty($_GET['error'])) {
throw new Exception(500, 'Got error: ' . htmlspecialchars($_GET['error'], ENT_QUOTES));
}
// if (!isset($_SESSION['accountId'])) {
// throw new Exception(500, 'Invalid parameter');
// }
if (!isset($_SESSION['accountId']) || !isset($_SESSION['oauth2state'])) {
throw new Exception(500, 'A session variable is missing. Please retry with a new session.');
}

if (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {

Expand Down

0 comments on commit fac6382

Please sign in to comment.