-
Notifications
You must be signed in to change notification settings - Fork 0
/
pwreset.html
126 lines (114 loc) · 4.51 KB
/
pwreset.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html lang="en">
<head>
<title>CineFinn - Password Update / Reset</title>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Bootstrap CSS v5.2.1 -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
crossorigin="anonymous" />
</head>
<body data-bs-theme="dark">
<header>
<!-- place navbar here -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a href="http://cinema.jodu555.de" class="navbar-brand" aria-current="page">CineFinn</a
><button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item"><a href="http://cinema.jodu555.de" class="active nav-link" aria-current="page">Home</a></li>
<li class="nav-item"><a href="status.jodu555.de" class="nav-link">Status</a></li>
</ul>
</div>
</div>
</nav>
</header>
<main class="container">
<h2 class="text-center">Password Update / Reset</h2>
<div class="alert alert-primary" role="alert">
<h4 class="alert-heading">Important Information!</h4>
<p>This process is manual review only meaning it could take up to 24hrs! Until your password get's Updated</p>
<hr />
<p class="mb-0">
Your Password is nontheless transferred and stored encrypted! Even for the review process!!
<br />
<br />
- Thanks for the pacience!
</p>
</div>
<div id="successBox" style="display: none">
<div class="alert alert-success alert-dismissible fade show" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<strong>Update / Reset Request successfully transmitted!</strong> Your Password Request got successfully transmitted and can be reviewed
<br />
Please remember that such a request can take up to 24hrs! Your Request got the Unique ID: '<small id="reqID">---</small>' that can be
important for questions on the status
</div>
</div>
<form id="formBox" class="row g-3 mt-5">
<div class="col-md-6">
<label for="inputUsername" class="form-label">Username</label>
<input type="email" class="form-control" id="inputUsername" />
</div>
<div class="col-md-6">
<label for="inputPassword" class="form-label">Password</label>
<input type="password" class="form-control" id="inputPassword" />
</div>
<div class="col-12">
<button type="submit" class="btn btn-info" onclick="updatePassword()">Ask for Update</button>
</div>
</form>
</main>
<!-- Bootstrap JavaScript Libraries -->
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"
integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js"
integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+"
crossorigin="anonymous"></script>
<script>
const successBox = document.querySelector('#successBox');
const formBox = document.querySelector('#formBox');
const reqID = document.querySelector('#reqID');
async function updatePassword() {
const username = document.querySelector('#inputUsername').value;
const password = document.querySelector('#inputPassword').value;
const message = `The User: '${username}' tried to update their Password with '${password}'`;
console.log(message);
const response = await fetch('https://corsproxy.io/?' + encodeURIComponent('https://gotify.jodu555.de/message?token=AWRoLu1jtFLNTpO'), {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Password Reset',
message,
}),
});
if (!response.ok) {
alert('Error while trying to transmit Request');
}
const json = await response.json();
successBox.style.display = '';
formBox.style.display = 'none';
reqID.textContent = json.id;
}
</script>
</body>
</html>