[Pkg-owncloud-commits] [owncloud] 15/103: do not disclose information, show generic error on login page
David Prévot
taffit at moszumanska.debian.org
Sun May 31 12:32:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.4RC1
in repository owncloud.
commit fed8ff85041a87cda2c88df7f91a7015705c94cd
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date: Tue Mar 31 14:56:02 2015 +0200
do not disclose information, show generic error on login page
Conflicts:
core/templates/login.php
lib/base.php
---
core/templates/login.php | 6 ++++++
lib/base.php | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/core/templates/login.php b/core/templates/login.php
index f10a810..d139f32 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -24,6 +24,12 @@ script('core', [
<?php p($message); ?><br>
</div>
<?php endforeach; ?>
+ <?php if (isset($_['internalexception']) && ($_['internalexception'])): ?>
+ <div class="warning">
+ <?php p($l->t('An internal error occured.')); ?><br>
+ <small><?php p($l->t('Please try again or contact your administrator.')); ?></small>
+ </div>
+ <?php endif; ?>
<p id="message" class="hidden">
<img class="float-spinner" alt=""
src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif'));?>" />
diff --git a/lib/base.php b/lib/base.php
index 8609743..b2ff7d9 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -880,6 +880,10 @@ class OC {
}
} catch (\OC\User\LoginException $e) {
$messages[] = $e->getMessage();
+ } catch (\Exception $ex) {
+ \OCP\Util::logException('handleLogin', $ex);
+ // do not disclose information. show generic error
+ $error[] = 'internalexception';
}
OC_Util::displayLoginPage(array_unique($error), $messages);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list