From cc82adf23d010fed74a819f14b201c0b214de081 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 11 May 2019 12:54:09 +0100 Subject: [PATCH] firstrun: Fix filter_var call --- modules/feature-firstrun.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/feature-firstrun.php b/modules/feature-firstrun.php index 6add06a..1cbb100 100644 --- a/modules/feature-firstrun.php +++ b/modules/feature-firstrun.php @@ -42,6 +42,8 @@ register_module([

You can still complete the setup manually, however! Once done, set firstrun_complete in peppermint.json to true.

")); } + + // 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", "

Oops! Looks like you forgot to enter an email address. Try going back in your browser and filling one in.

")); } - 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", "

Oops! Looks like that email address isn't valid. Try going back in your browser and correcting it.

")); }