aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.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/diaspora.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/diaspora.php')
-rwxr-xr-xinclude/diaspora.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 1e04b6b44..fc7dbfa18 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1704,9 +1704,9 @@ function diaspora_conversation($importer,$xml,$msg) {
}
if($subject)
- $subject = base64url_encode($subject);
+ $subject = str_rot47(base64url_encode($subject));
if($body)
- $body = base64url_encode($body);
+ $body = str_rot47(base64url_encode($body));
q("insert into mail ( `channel_id`, `convid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_flags`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')",
intval($importer['channel_id']),
@@ -1836,9 +1836,9 @@ function diaspora_message($importer,$xml,$msg) {
$key = get_config('system','pubkey');
if($subject)
- $subject = base64url_encode($subject);
+ $subject = str_rot47(base64url_encode($subject));
if($body)
- $body = base64url_encode($body);
+ $body = str_rot47(base64url_encode($body));
q("insert into mail ( `channel_id`, `convid`, `from_xchan`,`to_xchan`,`title`,`body`,`mail_flags`,`mid`,`parent_mid`,`created`) values ( %d, %d, '%s', '%s', '%s', '%s', '%d','%s','%s','%s')",
intval($importer['channel_id']),
@@ -2861,9 +2861,9 @@ function diaspora_send_mail($item,$owner,$contact) {
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']));
}