aboutsummaryrefslogtreecommitdiffstats
path: root/include/message.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-03-27 00:17:14 +0100
committerMax Kostikov <max@kostikov.co>2019-03-27 00:17:14 +0100
commitf55dfc9025bb92896c84affc379e13706d25e448 (patch)
tree2635fee27d45dc3a8d1faf7924b064204ad852e3 /include/message.php
parentc218970890c9d522db67dd7f10d700c04c35a61d (diff)
downloadvolse-hubzilla-f55dfc9025bb92896c84affc379e13706d25e448.tar.gz
volse-hubzilla-f55dfc9025bb92896c84affc379e13706d25e448.tar.bz2
volse-hubzilla-f55dfc9025bb92896c84affc379e13706d25e448.zip
Fix wrong permissions on attached images in personal messages
Diffstat (limited to 'include/message.php')
-rw-r--r--include/message.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/message.php b/include/message.php
index 037c59c60..ae19b84b0 100644
--- a/include/message.php
+++ b/include/message.php
@@ -220,8 +220,8 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
foreach($images as $image) {
if(! stristr($image,z_root() . '/photo/'))
continue;
- $image_uri = substr($image,strrpos($image,'/') + 1);
- $image_uri = substr($image_uri,0, strpos($image_uri,'-'));
+ $image_uri = substr($image, strrpos($image,'/') + 1);
+ $image_uri = substr($image_uri, 0, strpos($image_uri, '.' - 2));
$r = q("UPDATE photo SET allow_cid = '%s' WHERE resource_id = '%s' AND uid = %d and allow_cid = '%s'",
dbesc('<' . $recipient . '>'),
dbesc($image_uri),