MozillaZine

[Ext] Opera Wand for Firefox - SecureLogin

Announce and Discuss the Latest Theme and Extension Releases.
Isidan
 
Posts: 1
Joined: September 12th, 2012, 12:47 am

Post Posted September 12th, 2012, 12:52 am

Can anyone, please, post more detailed instructions on how to alter this code (for those who aren't advanced users). 8-)

Thank you so much! :)

andriuz
 
Posts: 2
Joined: September 12th, 2012, 1:15 pm

Post Posted September 12th, 2012, 1:23 pm

Help link and HELP button points to forbidden address http://securelogin.mozdev.org/drupal/wiki/

WildcatRay

User avatar
 
Posts: 7480
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Post Posted September 22nd, 2012, 8:09 pm

Philip Chee wrote:
Benjamin Markson wrote:Changing line 829 in secureLogin.js from:
Code: Select all
if(elements[i].type == 'text') {

...to:
Code: Select all
if(elements[i].type == 'text' || elements[i].type == 'email') {

Code: Select all
if (/(^text|^email)/i.test(elements[i].type)) {

Benjamin Markson wrote:And, following line 1542, adding this code in secureLogin.js [in fact a copy of lines 1532-1542 but for 'email']:
Code: Select all
case 'email':
    if(!usernameField || elements[i].name != usernameField.name) {
        addToDataString(elements[i].name, elements[i].value);
    } else {
        // This is the userName field - use the saved username as value:
        addToDataString(
            usernameField.name,
            this.getUsernameFromLoginObject(this.secureLogins[selectedIndex])
        );
    }
    break;

...does, indeed, cure the Google Login Page problem.

You don't have to duplicate the whole section. Instead you can use the fact that the switch statement falls through:
Code: Select all
case 'text':
case 'email':
    if(!usernameField || elements[i].name != usernameField.name) {
        addToDataString(elements[i].name, elements[i].value);
    } else {
        // This is the userName field - use the saved username as value:
        addToDataString(
            usernameField.name,
            this.getUsernameFromLoginObject(this.secureLogins[selectedIndex])
        );
    }
    break;

Phil

Thanks Benjamin and Phil for this fix.
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi

tFF
 
Posts: 6
Joined: November 28th, 2004, 7:02 pm

Post Posted September 24th, 2012, 4:05 am

Here's a unified patch compiling both solutions. I preferred IFs and ORs to regexp as the latter is unreasonably slower for such a simple task.
Just apply the patch from a directory with an unpacked extension.
Here's what we have:
Code: Select all
--- .\chrome\content\secureLogin.js
+++ .\chrome\content\secureLogin.js
@@ -826,7 +826,7 @@
          // Skip disabled elements or elements without a "name":
           if(!elements[i].name || elements[i].disabled)
              continue;               
-         if(elements[i].type == 'text') {
+         if(elements[i].type == 'text' || elements[i].type == 'email') {
             // input of type "text" found, this is no password only form:
             inputTextFound = true;
             
@@ -1529,6 +1529,7 @@
                    }
                   
                   switch(elements[i].type) {
+                     case 'email':
                      case 'text':
                         if(!usernameField || elements[i].name != usernameField.name) {
                             addToDataString(elements[i].name, elements[i].value);

efox99
 
Posts: 137
Joined: March 24th, 2011, 7:55 pm

Post Posted September 25th, 2012, 5:45 pm

tFF wrote:Here's a unified patch compiling both solutions. I preferred IFs and ORs to regexp as the latter is unreasonably slower for such a simple task.
Just apply the patch from a directory with an unpacked extension.
Here's what we have:
Code: Select all
--- .\chrome\content\secureLogin.js
+++ .\chrome\content\secureLogin.js
@@ -826,7 +826,7 @@
          // Skip disabled elements or elements without a "name":
           if(!elements[i].name || elements[i].disabled)
              continue;               
-         if(elements[i].type == 'text') {
+         if(elements[i].type == 'text' || elements[i].type == 'email') {
             // input of type "text" found, this is no password only form:
             inputTextFound = true;
             
@@ -1529,6 +1529,7 @@
                    }
                   
                   switch(elements[i].type) {
+                     case 'email':
                      case 'text':
                         if(!usernameField || elements[i].name != usernameField.name) {
                             addToDataString(elements[i].name, elements[i].value);


Hi! Can you explain this in neanderthal terms? I would understand easier lol

hhp211
 
Posts: 10
Joined: February 14th, 2009, 12:19 pm

Post Posted September 26th, 2012, 8:17 am

THANKS,,, you guys are flip freekin awesome,,,, this was driving me NUTS!!! ](*,) ](*,)

Str0ngwun

User avatar
 
Posts: 222
Joined: January 29th, 2011, 9:50 am

Post Posted September 27th, 2012, 2:28 pm

For the lazy ones: here is the link to the version with the fix published above.

WildcatRay

User avatar
 
Posts: 7480
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Post Posted September 29th, 2012, 8:27 am

Str0ngwun wrote:For the lazy ones: here is the link to the version with the fix published above.

Which version of the patches did you use?
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi

Str0ngwun

User avatar
 
Posts: 222
Joined: January 29th, 2011, 9:50 am

Post Posted September 29th, 2012, 9:04 am


WildcatRay

User avatar
 
Posts: 7480
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Post Posted September 29th, 2012, 9:26 am

Str0ngwun wrote:this one

tFF's patch. Thanks.
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi

ybbao
 
Posts: 13
Joined: August 23rd, 2010, 2:38 am

Post Posted October 3rd, 2012, 5:36 pm

tFF's
hello.The version can not work in firefox 18a1 nightly,can you fixed it?
PS:The window can appear, but to complete the project can not.

WildcatRay

User avatar
 
Posts: 7480
Joined: October 18th, 2007, 7:03 pm
Location: Columbus, OH

Post Posted October 3rd, 2012, 6:29 pm

Patched version working fine for me in today's Nightly (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0a1 ID:20121003030545)
Ray

OS'es: 4 computers with Win10 Pro 64-bit; Current Firefox, Beta, Nightly, Chrome, Vivaldi

ybbao
 
Posts: 13
Joined: August 23rd, 2010, 2:38 am

Post Posted October 8th, 2012, 1:30 am

tFF's
hello.Can you try fixed it for firefox 18a1 nightly?
url:http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-win32/1349659953/

mantra
 
Posts: 330
Joined: September 29th, 2010, 7:21 am

Post Posted October 10th, 2012, 10:33 pm

but will securelogin be devloped in the future ?
is there an alternatve?
http://www.pcmech.com/article/clearing- ... he-how-to/
windows firefox 49.0.2 ,thunderbird 45.4 and under linux , firefox and thunderbird are always updated

Str0ngwun

User avatar
 
Posts: 222
Joined: January 29th, 2011, 9:50 am

Post Posted October 12th, 2012, 2:38 am

no, no.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 3 guests