aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.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/items.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/items.php')
-rwxr-xr-xinclude/items.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index ce0c2461a..ea98c1a6f 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1400,9 +1400,9 @@ function encode_mail($item) {
if(array_key_exists('mail_flags',$item) && ($item['mail_flags'] & MAIL_OBSCURED)) {
if($item['title'])
- $item['title'] = base64url_decode($item['title']);
+ $item['title'] = base64url_decode(str_rot47($item['title']));
if($item['body'])
- $item['body'] = base64url_decode($item['body']);
+ $item['body'] = base64url_decode(str_rot47($item['body']));
}
$x['message_id'] = $item['mid'];
@@ -1455,12 +1455,12 @@ function get_mail_elements($x) {
$key = get_config('system','pubkey');
$arr['mail_flags'] |= MAIL_OBSCURED;
if($arr['body']) {
- $arr['body'] = base64url_encode($arr['body']);
+ $arr['body'] = str_rot47(base64url_encode($arr['body']));
$arr['body'] = htmlspecialchars($arr['body'],ENT_COMPAT,'UTF-8',false);
}
if($arr['title']) {
- $arr['title'] = base64url_encode($arr['title']);
+ $arr['title'] = str_rot47(base64url_encode($arr['title']));
$arr['title'] = htmlspecialchars($arr['title'],ENT_COMPAT,'UTF-8',false);
}
if($arr['created'] > datetime_convert())