aboutsummaryrefslogtreecommitdiffstats
path: root/include/message.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-19 21:51:48 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-19 21:51:48 -0700
commit507dfb9f85bd0376901750f76f5978df3738f3e2 (patch)
tree32019a691dc01a70e6c965a06ca75432b80e5787 /include/message.php
parentacc8e10a450f8427f523261f0f6e9d683cfe0e38 (diff)
downloadvolse-hubzilla-507dfb9f85bd0376901750f76f5978df3738f3e2.tar.gz
volse-hubzilla-507dfb9f85bd0376901750f76f5978df3738f3e2.tar.bz2
volse-hubzilla-507dfb9f85bd0376901750f76f5978df3738f3e2.zip
add rot47 to the mix. This shouldn't affect the speed to any measurable degree.
Diffstat (limited to 'include/message.php')
-rw-r--r--include/message.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/message.php b/include/message.php
index 82c48ba85..8f1430e64 100644
--- a/include/message.php
+++ b/include/message.php
@@ -164,9 +164,9 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$jattach = (($attachments) ? json_encode($attachments) : '');
if($subject)
- $subject = base64url_encode($subject);
+ $subject = str_rot47(base64url_encode($subject));
if($body)
- $body = base64url_encode($body);
+ $body = str_rot47(base64url_encode($body));
@@ -286,9 +286,9 @@ function private_messages_list($uid, $mailbox = '', $start = 0, $numitems = 0) {
$r[$k]['seen'] = (($rr['mail_flags'] & MAIL_SEEN) ? 1 : 0);
if($r[$k]['mail_flags'] & MAIL_OBSCURED) {
if($r[$k]['title'])
- $r[$k]['title'] = base64url_decode($r[$k]['title']);
+ $r[$k]['title'] = base64url_decode(str_rot47($r[$k]['title']));
if($r[$k]['body'])
- $r[$k]['body'] = base64url_decode($r[$k]['body']);
+ $r[$k]['body'] = base64url_decode(str_rot47($r[$k]['body']));
}
}
@@ -324,9 +324,9 @@ function private_messages_fetch_message($channel_id, $messageitem_id, $updatesee
$messages[$k]['to'] = find_xchan_in_array($message['to_xchan'],$c);
if($messages[$k]['mail_flags'] & MAIL_OBSCURED) {
if($messages[$k]['title'])
- $messages[$k]['title'] = base64url_decode($messages[$k]['title']);
+ $messages[$k]['title'] = base64url_decode(str_rot47($messages[$k]['title']));
if($messages[$k]['body'])
- $messages[$k]['body'] = base64url_decode($messages[$k]['body']);
+ $messages[$k]['body'] = base64url_decode(str_rot47($messages[$k]['body']));
}
}
@@ -411,9 +411,9 @@ function private_messages_fetch_conversation($channel_id, $messageitem_id, $upda
$messages[$k]['to'] = find_xchan_in_array($message['to_xchan'],$c);
if($messages[$k]['mail_flags'] & MAIL_OBSCURED) {
if($messages[$k]['title'])
- $messages[$k]['title'] = base64url_decode($messages[$k]['title']);
+ $messages[$k]['title'] = base64url_decode(str_rot47($messages[$k]['title']));
if($messages[$k]['body'])
- $messages[$k]['body'] = base64url_decode($messages[$k]['body']);
+ $messages[$k]['body'] = base64url_decode(str_rot47($messages[$k]['body']));
}
}