User name munging.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

User name munging.

byrnejb
I have encountered a problem with SM (SquirrelMail version
1.4.22-4.el6).  I have a user that habitually logs into SM using
'USERNAME' whereas his IMAP account is 'username'.  Now, the IMAP
logon works fine whichever form he uses, he always goes to the correct
IMAP mail directory.  However, his SM settings disappear when he uses
'USERNAME' instead of 'username'.

I infer from this scant evidence that SM does not treat 'USERNAME' as
'username' for its own use.  Is there any way to force SM to munge
mixedcase case USERNAMEs to lowercase?

Sincerely,

--
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:[hidden email]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: User name munging.

Juergen Nickelsen
On 19.05.2016 18:31, James B. Byrne wrote:

> I infer from this scant evidence that SM does not treat 'USERNAME' as
> 'username' for its own use.  Is there any way to force SM to munge
> mixedcase case USERNAMEs to lowercase?

I have done user name munging using a plugin that hooks into
'login_before' and accesses global $login_username:

// setup function
function squirrelmail_plugin_init_jni_prelogin()
{
   global $squirrelmail_plugin_hooks;

   $squirrelmail_plugin_hooks['login_before']['jni_prelogin']
      = 'jni_prelogin_login_before';
}

// hook function
function jni_prelogin_login_before() {
        global $login_username;

        $login_username = preg_replace('/@.*/', '', $login_username);
        $login_username = trim($login_username);
        $login_username = strtolower($login_username);
}

Regards, Juergen.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: User name munging.

Paul Lesniewski
On 5/19/16, Juergen Nickelsen <[hidden email]> wrote:
> On 19.05.2016 18:31, James B. Byrne wrote:
>
>> I infer from this scant evidence that SM does not treat 'USERNAME' as
>> 'username' for its own use.  Is there any way to force SM to munge
>> mixedcase case USERNAMEs to lowercase?

Have you (OP) taken a look at conf.pl - General Options?  Number 5.
Or $force_username_lowercase in the config file.  That's 1.4.x, 1.5.x
is similar if not the same.

> $login_username = preg_replace('/@.*/', '', $login_username);
> $login_username = trim($login_username);
> $login_username = strtolower($login_username);

Along with the above setting, the Login Manager plugin can also do
stuff like this

--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: User name munging.

byrnejb

On Thu, May 19, 2016 16:09, Paul Lesniewski wrote:

>
> Have you (OP) taken a look at conf.pl - General Options?  Number 5.
> Or $force_username_lowercase in the config file.  That's 1.4.x, 1.5.x
> is similar if not the same.
>
>> $login_username = preg_replace('/@.*/', '', $login_username);
>> $login_username = trim($login_username);
>> $login_username = strtolower($login_username);
>
> Along with the above setting, the Login Manager plugin can also do
> stuff like this
>

I have now.  Thank you for the reference.


--
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:[hidden email]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: User name munging.

Juergen Nickelsen
In reply to this post by Paul Lesniewski
On 19.05.2016 22:09, Paul Lesniewski wrote:
> On 5/19/16, Juergen Nickelsen <[hidden email]> wrote:
[...]
>> $login_username = preg_replace('/@.*/', '', $login_username);
>> $login_username = trim($login_username);
>> $login_username = strtolower($login_username);
>
> Along with the above setting, the Login Manager plugin can also do
> stuff like this

Ah, that is interesting to know. Next time... But I had to make a plugin
for a number of application-specific things anyway, so this was was easy
to fit in.

Regards, Juergen.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users
Loading...