Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Allow publish.iacr.org to authenticate itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmccurley committed Nov 30, 2023
1 parent d5370be commit 2cefe8f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions iacr/api/updatePaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@
$Opt['dbName']);

if (!hash_equals(get_hmac($msg), $_POST['auth'])) {
showError('Bad auth token');
exit;
// 2023-11-30 added ability to authenticate from publish.iacr.org without year.
$msg = $Opt['shortName'] . $_POST['paperId'] . $_POST['email'];
if (!hash_equals(get_hmac($msg), $_POST['auth'])) {
showError('Bad auth token');
exit;
}
}


if (empty($_POST['action']) || $_POST['action'] !== 'finalPaper') {
showError('Unknown action');
Expand Down

0 comments on commit 2cefe8f

Please sign in to comment.