Adding hexadecimal check for photos
[friendica.git/.git] / mod / photos.php
index b18c06e..6a84e61 100644 (file)
@@ -1027,6 +1027,10 @@ function photos_content(App $a)
 
        // Display a single photo album
        if ($datatype === 'album') {
+               // if $datum is not a valid hex, redirect to the default page
+               if (!Strings::isHex($datum)) {
+                       $a->internalRedirect();
+               }
                $album = hex2bin($datum);
 
                $total = 0;