fossasia / susi_chromebot

SUSI.AI Chrome Extension
GNU Lesser General Public License v2.1
1.54k stars 140 forks source link

No email field checker inside signup.js #553

Open harshit-soora opened 3 years ago

harshit-soora commented 3 years ago

I'm submitting a ...

Current behavior:

The code does restrict the user if they enter any malicious script code inside the email field of signup.html page

Expected behavior:

The behavior remains same, but provide a stability that it checks the edit field inside the same script(signup.js) rather than going into another script file and checking whether the written email in input field of signup.html is in right regular-language structure of an email.

Steps to reproduce:

Say if we enter some email like soora<html>.com inside the email field of signup.html then the script signup.js doesn't check this explicit behavior rather checked in some other(future) script. This isn't the right behavior one should expect and should be resolved in the script file of the given page itself.

This is implemented inside the script file for login.html page but not for signup.html

Related code:

var email=document.getElementById("email").value;
if(!email){
    alert("Email field cannot be empty");
    return;
}
I am using Ubuntu 20.04

Would you like to work on the issue?

Yes, I will complete it myself.