aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index c43beb8d4..428aff2a0 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -618,6 +618,12 @@ function photos_content(&$a) {
if($datatype === 'album') {
+ if((strlen($datum) & 1) || (! ctype_xdigit($datum))) {
+ notice( t('Album name could not be decoded') . EOL);
+ logger('mod_photos: illegal album encoding: ' . $datum);
+ $datum = '';
+ }
+
$album = hex2bin($datum);
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'