aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-14 23:05:19 -0700
committerfriendica <info@friendica.com>2014-08-14 23:05:19 -0700
commit1978500e8ffb8ffdffd2d2969cbafb6f43b9dde4 (patch)
tree562e6c06817fb7594bce32f1f9539efd71415d24 /mod/photos.php
parent21adbad4c1a0f9a7953c3c011a3669d09cfc2bb4 (diff)
downloadvolse-hubzilla-1978500e8ffb8ffdffd2d2969cbafb6f43b9dde4.tar.gz
volse-hubzilla-1978500e8ffb8ffdffd2d2969cbafb6f43b9dde4.tar.bz2
volse-hubzilla-1978500e8ffb8ffdffd2d2969cbafb6f43b9dde4.zip
pkcs1 to pkcs8 key conversion - this is a lot easier than parsing ASN.1 DER formats and rebuilding the darn things like we used to do. Check for illegal hex encoded album names in mod/photo so we don't throw php errors. Don't know where they come from but we get a lot of them.
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index c43beb8d4..86e027bab 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -618,6 +618,11 @@ function photos_content(&$a) {
if($datatype === 'album') {
+ if((strlen($datum) & 1) || (! ctype_xdigit($datum))) {
+ notice( t('Album name could not be decoded') . EOL);
+ $datum = '';
+ }
+
$album = hex2bin($datum);
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'