aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-03-27 00:26:26 +0100
committerMax Kostikov <max@kostikov.co>2019-03-27 00:26:26 +0100
commit1421c4e9d371c0e09ba9348433062d256c7d13a4 (patch)
tree2635fee27d45dc3a8d1faf7924b064204ad852e3
parentc218970890c9d522db67dd7f10d700c04c35a61d (diff)
parentf55dfc9025bb92896c84affc379e13706d25e448 (diff)
downloadvolse-hubzilla-1421c4e9d371c0e09ba9348433062d256c7d13a4.tar.gz
volse-hubzilla-1421c4e9d371c0e09ba9348433062d256c7d13a4.tar.bz2
volse-hubzilla-1421c4e9d371c0e09ba9348433062d256c7d13a4.zip
Merge branch 'dev' into 'dev'
Fix wrong permissions on attached images in personal messages See merge request hubzilla/core!1574
-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),