do not disclose information, show generic error on login page

Conflicts:
	core/templates/login.php
	lib/base.php
remotes/origin/poc-doctrine-migrations
Jörn Friedrich Dreyer 11 years ago
parent 488405d1ec
commit 8964c5068c
  1. 6
      core/templates/login.php
  2. 4
      lib/base.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'));?>">

@ -957,6 +957,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);

Loading…
Cancel
Save