Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update registrationservice.php - allowed registration domains are checked case sensitive #184

Open
wants to merge 1 commit into
base: master
from

Conversation

@NoSleep82
Copy link

commented Jul 5, 2019

Allowed domains were checked case sensitive

Update registrationservice.php
Allowed domains were checked case sensitive

@NoSleep82 NoSleep82 changed the title Update registrationservice.php Update registrationservice.php - allowed registration domains are checked case sensitive Jul 5, 2019

@@ -215,7 +215,7 @@ public function checkAllowedDomains($email) {
foreach ($allowed_domains as $domain) {
$maildomain = explode("@", $email)[1];
// valid domain, everythings fine
if ($maildomain === $domain) {
if (strtolower($maildomain) === strtolower($domain)) {

This comment has been minimized.

Copy link
@fancycode

fancycode Aug 9, 2019

Better would be to use strcasecmp to avoid the temporary string objects:
https://www.php.net/manual/en/function.strcasecmp.php

if (strcasecmp($maildomain, $domain) === 0) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.