blob: 34a41dfa09cc6901402a21492db0d791f8948787 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once("core.php");
3
4if (!security::checkParams("GET", [
5 ["token", security::PARAM_NEMPTY]
6])) {
7 security::go("index.php?msg=unexpected");
8}
9
10$token = $_GET["token"];
11
12$recovery = recovery::getUnusedRecovery($token);
13if ($recovery === false) security::go("index.php?msg=recovery2failed");
14?>
15<!DOCTYPE html>
16<html>
17<head>
18 <title><?php echo $conf["appName"]; ?></title>
19 <?php visual::includeHead(); ?>
20 <link rel="stylesheet" href="css/index.css">
21 <script src="js/index.js"></script>
22</head>
23<?php visual::printBodyTag(); ?>
24 <div class="login mdl-shadow--4dp">
25 <h2>Restablecer contraseƱa</h2>
26 <form action="dorecovery.php" method="POST" autocomplete="off" id="formulario">
27 <input type="hidden" name="token" value="<?=security::htmlsafe($recovery["token"])?>">
28 <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
29 <input class="mdl-textfield__input" type="password" name="password" id="password" autocomplete="off" data-required>
30 <label class="mdl-textfield__label" for="password">ContraseƱa</label>
31 </div>
32 <p class="mdl-color-text--grey-600"><?=security::htmlsafe(security::$passwordHelperText)?></p>
33
34 <p><button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">Restablecer</button></p>
35 </form>
36 </div>
37
38 <?php
39 visual::smartSnackbar([
40 ["weakpassword", security::$passwordHelperText]
41 ]);
42 ?>
43</body>
44</html>