aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 5b9b35c16..f2d9f3e69 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1199,9 +1199,9 @@ function unobscure(&$item) {
function unobscure_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']));
}
}
@@ -2557,3 +2557,9 @@ function userReadableSize($size) {
return $ret;
}
+
+function str_rot47($str) {
+ return strtr($str,
+ '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~',
+ 'PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO');
+}