summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-06-04 00:41:47 +0200
committerFlorin Peter <github@florin-peter.de>2013-06-04 00:41:47 +0200
commit14ac4fab054c332fe3a0e110bec6cb118bf83186 (patch)
tree232858096f95a30e61400db27765c73422f565df /apps
parentef97481a0d7dcedba830bc423d623111f6c2e774 (diff)
downloadnextcloud-server-14ac4fab054c332fe3a0e110bec6cb118bf83186.tar.gz
nextcloud-server-14ac4fab054c332fe3a0e110bec6cb118bf83186.zip
better handling for http post
Diffstat (limited to 'apps')
-rw-r--r--apps/files_encryption/files/error.php4
-rwxr-xr-xapps/files_encryption/lib/helper.php6
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_encryption/files/error.php b/apps/files_encryption/files/error.php
index 3118299b519..37e94e5658f 100644
--- a/apps/files_encryption/files/error.php
+++ b/apps/files_encryption/files/error.php
@@ -4,6 +4,10 @@ if (!isset($_)) { //also provide standalone error page
$l = OC_L10N::get('files_encryption');
+ if(isset($_GET['p']) && $_GET['p'] === '1') {
+ header('HTTP/1.0 404 ' . $l->t('Your private key is not valid! Maybe the your password was changed from outside.'));
+ }
+
// check if ajax request
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
\OCP\JSON::error(array('data' => array('message' => $l->t('Your private key is not valid! Maybe the your password was changed from outside.'))));
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index daa95f3f897..923cc2ce9dc 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -200,7 +200,11 @@ class Helper {
*/
public static function redirectToErrorPage() {
$location = \OC_Helper::linkToAbsolute('apps/files_encryption/files', 'error.php');
- header('Location: ' . $location);
+ $post = 0;
+ if(count($_POST) > 0) {
+ $post = 1;
+ }
+ header('Location: ' . $location . '?p=' . $post);
exit();
}
} \ No newline at end of file