add account_level, is_foreigner and is_member functions; convert all e2ee user input and prompts to hex to avoid javascipt's lame handling of quotes. !!This breaks all prior encrypted posts.!!

This commit is contained in:
friendica
2013-12-23 15:13:09 -08:00
parent 4517bdcff1
commit 63a42480c7
9 changed files with 80 additions and 16 deletions

View File

@@ -105,21 +105,24 @@ function bb_parse_crypt($match) {
$attributes = $match[1];
$algorithm = "";
preg_match("/alg='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$algorithm = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
$algorithm = $matches[1];
preg_match("/alg=\&quot\;(.*?)\&quot\;/ism", $attributes, $matches);
if ($matches[1] != "")
$algorithm = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
$algorithm = $matches[1];
$hint = "";
preg_match("/hint='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$hint = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
$hint = $matches[1];
preg_match("/hint=\&quot\;(.*?)\&quot\;/ism", $attributes, $matches);
if ($matches[1] != "")
$hint = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
$hint = $matches[1];
$x = random_string();