Skip to content

Commit 788ae5a

Browse files
committed
update TODO, log reasons for bad request
1 parent 8623b4f commit 788ae5a

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

TODO

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,21 @@
5757
- [v] webid
5858
- [v] wac
5959
- [v] solid-crud
60-
- [v] CI integration
60+
- [v] CI integration
61+
62+
------ Unit tests -----
63+
- [v] ClientRegistration
64+
- [v] JtiStore
65+
- [v] IpAttempts
66+
- [v] Util
67+
- [v] PasswordValidator
68+
- [ ] Mailer
69+
- [ ] MailTemplateGenerator
70+
- [ ] MailTemplates
71+
- [ ] Server
72+
- [ ] SolidNotifications
73+
- [ ] SolidPubSub
74+
- [ ] StorageServer
75+
- [ ] User
76+
- [-] Middleware
77+
- [-] Db

www/idp/index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,22 @@
199199
case "/api/accounts/new/":
200200
$verifyToken = User::getVerifyToken($_POST['confirm']);
201201
if (!$verifyToken) {
202+
error_log("No verify token sent");
202203
header("HTTP/1.1 400 Bad Request");
203204
exit();
204205
}
205206
if ($verifyToken['email'] !== $_POST['email']) {
207+
error_log("Verify token does not match email");
206208
header("HTTP/1.1 400 Bad Request");
207209
exit();
208210
}
209211
if (User::userEmailExists($_POST['email'])) {
212+
error_log("Account already exists");
210213
header("HTTP/1.1 400 Bad Request");
211214
exit();
212215
}
213216
if (!$_POST['password'] === $_POST['repeat_password']) {
217+
error_log("Password repeat does not match");
214218
header("HTTP/1.1 400 Bad Request");
215219
exit();
216220
}
@@ -222,6 +226,7 @@
222226

223227
$createdUser = User::createUser($newUser);
224228
if (!$createdUser) {
229+
error_log("Failed to create user");
225230
header("HTTP/1.1 400 Bad Request");
226231
exit();
227232
}

0 commit comments

Comments
 (0)