For old loans, the uuid is actually a text string, not a uuid.
[bookreader.git] / BookReaderIA / www / BookReaderAuth.php
index 878a6b6..04f25f7 100644 (file)
@@ -18,16 +18,17 @@ This file is part of BookReader.
     along with BookReader.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-$id = $_POST['id'];
-$uuid = $_POST['uuid'];
-$token = $_POST['token'];
-$bookPath = $_POST['bookPath'];
+$id = $_REQUEST['id'];
+$uuid = $_REQUEST['uuid'];
+$token = $_REQUEST['token'];
+$bookPath = $_REQUEST['bookPath'];
 
 if (!preg_match('/^\d{10}-[0-9a-f]{32}$/', $token)) {
     fatal();
 }
 
-if (!preg_match('/^[0-9a-f]{32}$/', $uuid)) {
+//if (!preg_match('/^[0-9a-f]{32}$/', $uuid)) {
+if (!preg_match('/^\S{1,128}$/', $uuid)) {
     fatal();
 }