Commit 0d89a21c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add missing username param to mobileupload.php


Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 3535cc53
...@@ -55,11 +55,24 @@ if ($token == '') { ...@@ -55,11 +55,24 @@ if ($token == '') {
exit; exit;
} }
$username = '';
try {
$username = param_variable('username');
}
catch (ParameterException $e) {
$username = '';
}
if ($username == '') {
header($protocol.' 500 Username cannot be blank');
exit;
}
$data = new StdClass; $data = new StdClass;
$USER = new User(); $USER = new User();
try { try {
$USER->find_by_mobileuploadtoken($token); $USER->find_by_mobileuploadtoken($token, $username);
} }
catch (AuthUnknownUserException $e) { catch (AuthUnknownUserException $e) {
header($protocol.' 500 Invalid user token'); header($protocol.' 500 Invalid user token');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment