Skip to content

Commit ab39785

Browse files
Update .edu domain validation to catch domains with .edu in middle
- Change from domain.endswith('.edu') to '.edu' in domain - Now catches domains like 'uncp.edu.pe' where .edu appears in middle - Tested locally: rejects [email protected], allows [email protected] - Addresses user feedback for more comprehensive .edu blocking Co-Authored-By: Alek <[email protected]>
1 parent da0518a commit ab39785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pcweb/pages/pricing/header.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def submit(self, form_data: dict[str, Any]):
149149
email = form_data.get("email", "").lower()
150150
if "@" in email:
151151
domain = email.split("@")[1]
152-
if domain in banned_domains or domain.endswith(".edu"):
152+
if domain in banned_domains or ".edu" in domain:
153153
self.banned_email = True
154154
yield rx.set_focus("email")
155155
return

0 commit comments

Comments
 (0)