X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=contrib%2Fdecrypt_headers.php;h=f053ed98870be44b0129f87273f2939d751c2893;hp=1e38107378b43efb9cc49a8f4bf150836b19f6d6;hb=de3178dc1a5117827e254544c6f164dba653ad83;hpb=432db2fc4af6edc726e9a52f023cd3bd1d664667;ds=sidebyside diff --git a/contrib/decrypt_headers.php b/contrib/decrypt_headers.php index 1e381073..f053ed98 100644 --- a/contrib/decrypt_headers.php +++ b/contrib/decrypt_headers.php @@ -1,24 +1,10 @@ ' +echo '' ."\n
\n\n" .""; if (sqgetGlobalVar('submit',$submit,SQ_POST)) { + $continue = TRUE; if (! sqgetGlobalVar('secret',$secret,SQ_POST) || - empty($secret)) - echo "You must enter encryption key.
\n"; + empty($secret)) { + $continue = FALSE; + echo "You must enter an encryption key.
\n"; + } if (! sqgetGlobalVar('enc_string',$enc_string,SQ_POST) || - empty($enc_string)) - echo "You must enter encrypted string.
\n"; + empty($enc_string)) { + $continue = FALSE; + echo "You must enter an encrypted string.
\n"; + } - if (isset($enc_string) && ! base64_decode($enc_string)) { - echo "Encrypted string should be BASE64 encoded.
\n"
- ."Please enter all characters that are listed after header name.
Encrypted string should be BASE64 encoded.
\n"
+ ."Please enter all characters that are listed after header name.
Decoded string: ".htmlspecialchars($string)."
\n"; } - echo "Decoded string: ".$string."
\n"; } echo "