mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 05:22:59 +00:00
firstrun: Fix filter_var call
This commit is contained in:
parent
215c0d41ef
commit
cc82adf23d
1 changed files with 3 additions and 1 deletions
|
@ -42,6 +42,8 @@ register_module([
|
|||
<p>You can still complete the setup manually, however! Once done, set <code>firstrun_complete</code> in peppermint.json to <code>true</code>.</p>"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: Check the environment here first
|
||||
// - Make sure peppermint.json isn't accessible
|
||||
// - Check for required modules?
|
||||
|
@ -116,7 +118,7 @@ register_module([
|
|||
http_response_code(400);
|
||||
exit(page_renderer::render_main("Missing information - Error - Pepperminty Wiki", "<p>Oops! Looks like you forgot to enter an email address. Try going back in your browser and filling one in.</p>"));
|
||||
}
|
||||
if(!filter_var($_POST["email-address"], FILTER_VALIDATE_EMAIL)) {
|
||||
if(filter_var($_POST["email-address"], FILTER_VALIDATE_EMAIL) === false) {
|
||||
http_response_code(400);
|
||||
exit(page_renderer::render_main("Invalid email address - Error - Pepperminty Wiki", "<p>Oops! Looks like that email address isn't valid. Try going back in your browser and correcting it.</p>"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue