do not disclose information, show generic error on login page
Conflicts: core/templates/login.php lib/base.php
This commit is contained in:
parent
488405d1ec
commit
8964c5068c
2 changed files with 10 additions and 0 deletions
|
@ -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…
Reference in a new issue