Skip to content

Commit

Permalink
Workaround for & encoding in links
Browse files Browse the repository at this point in the history
  • Loading branch information
asuweb authored and endelwar committed Apr 28, 2017
1 parent e7d6546 commit 438afdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions mailscanner/auto-release.php
Expand Up @@ -32,13 +32,17 @@
require_once __DIR__ . '/functions.php';
if (file_exists('conf.php')) {
$output = array();
if (isset($_GET['mid'], $_GET['r'])) {
if (isset($_GET['mid']) && (isset($_GET['r']) || isset($_GET['amp;r']))) {
dbconn();
$mid = deepSanitizeInput($_GET['mid'], 'url');
if ($mid === false || !validateInput($mid, 'msgid')) {
die();
}
$token = deepSanitizeInput($_GET['r'], 'url');
if (isset($_GET['amp;r'])) {
$token = deepSanitizeInput($_GET['amp;r'], 'url');
} else {
$token = deepSanitizeInput($_GET['r'], 'url');
}
if (!validateInput($token, 'releasetoken')) {
die(__('dietoken99'));
}
Expand Down
9 changes: 6 additions & 3 deletions mailscanner/viewmail.php
Expand Up @@ -47,11 +47,14 @@ function do_action(id, token, action) {
</SCRIPT>
<?php
dbconn();
if (!isset($_GET['id'])) {
if (!isset($_GET['id']) && !isset($_GET['amp;id'])) {
die(__('nomessid06'));
}

$message_id = deepSanitizeInput($_GET['id'], 'url');
if (isset($_GET['amp;id'])) {
$message_id = deepSanitizeInput($_GET['amp;id'], 'url');
} else {
$message_id = deepSanitizeInput($_GET['id'], 'url');
}
if (!validateInput($message_id, 'msgid')) {
die();
}
Expand Down

0 comments on commit 438afdd

Please sign in to comment.