]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Add more Strings::isHex() checks to photos
[friendica.git] / mod / photos.php
index 6a84e61388cec16e76698090ae5fd158431900aa..07693742c184c59f90915fca0d71e987fa244a27 100644 (file)
@@ -188,6 +188,9 @@ function photos_post(App $a)
        }
 
        if ($a->argc > 3 && $a->argv[2] === 'album') {
+               if (!Strings::isHex($a->argv[3])) {
+                       $a->internalRedirect();
+               }
                $album = hex2bin($a->argv[3]);
 
                if ($album === L10n::t('Profile Photos') || $album === 'Contact Photos' || $album === L10n::t('Contact Photos')) {
@@ -960,7 +963,7 @@ function photos_content(App $a)
                        return;
                }
 
-               $selname = $datum ? hex2bin($datum) : '';
+               $selname = Strings::isHex($datum) ? hex2bin($datum) : '';
 
                $albumselect = '';