Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: login without password programmaticly Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
seco
Newbie
Newbie
Avatar

Joined: 25 January 2015
Location: Egypt
Online Status: Offline
Posts: 8
Posted: 26 January 2015 at 4:46am | IP Logged Quote seco

Hi
i try to login using login-to-account.php found in examples folder
but this one requires password
and in my case passwords are md5(md5) and i cant login using it
im asking can i login programmaticly without password
thanks in advance.
Back to Top View seco's Profile Search for other posts by seco
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 January 2015 at 4:48am | IP Logged Quote Igor

That's not possible, WebMail needs account password to tell it to IMAP server for authentication.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
seco
Newbie
Newbie
Avatar

Joined: 25 January 2015
Location: Egypt
Online Status: Offline
Posts: 8
Posted: 26 January 2015 at 5:01am | IP Logged Quote seco

so how i can login with hashed password
or i have to store passwords in plain in db
Back to Top View seco's Profile Search for other posts by seco
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 January 2015 at 5:05am | IP Logged Quote Igor

That's more of a question to mail server you are using. For WebMail, it doesn't matter what you supply as passwords.

In general case, email account passwords are supplied via integration API in unencrypted fashion - but that absolutely doesn't mean passwords are stored that way in a database. WebMail stores passwords in database encoded with a special two-way algorithm.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
seco
Newbie
Newbie
Avatar

Joined: 25 January 2015
Location: Egypt
Online Status: Offline
Posts: 8
Posted: 26 January 2015 at 5:36am | IP Logged Quote seco

ok how i can know that password
i want to debug to see what is checking exactly and see how i can handle it
could you give me the filename where password comparing with the stored one
thanks in advance.
Back to Top View seco's Profile Search for other posts by seco
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 January 2015 at 6:11am | IP Logged Quote Igor

That's libraries/MailSo/Imap/ImapClient.php file, see Login method there.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
seco
Newbie
Newbie
Avatar

Joined: 25 January 2015
Location: Egypt
Online Status: Offline
Posts: 8
Posted: 26 January 2015 at 6:15am | IP Logged Quote seco

one last question
i found that there is /etc/shadow contains hashed passwords
so in this case i have to save passwords in database plain or 2 way encryption if so what encryption do you recommend ?
Back to Top View seco's Profile Search for other posts by seco
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 January 2015 at 6:21am | IP Logged Quote Igor

Your application will need a way to supply passwords in a form your IMAP server can handle. In the absolute majority of cases, that must be unencrypted form, so storing hashed password will just not work as it's one-way encoding.

In libraries/afterlogic/common/utils.php file, you'll find DecodePassword and EncodePassword methods which deal with password encoding. The methods are static and they use nothing but standard PHP functions so you can copy those to one of your classes and use them from there.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
seco
Newbie
Newbie
Avatar

Joined: 25 January 2015
Location: Egypt
Online Status: Offline
Posts: 8
Posted: 26 January 2015 at 6:47am | IP Logged Quote seco

i found this file called integr.php
there is function called UserLoginByEmail it accepts null passwords
what this function do exactly?
Back to Top View seco's Profile Search for other posts by seco
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 January 2015 at 6:49am | IP Logged Quote Igor

Quote:
i found this file called integr.php
there is function called UserLoginByEmail it accepts null passwords


That doesn't look like something from current v7 of WebMail Pro. Make sure you actually use the latest version.

--
Regards,
Igor, AfterLogiC Support
Back to Top View Igor's Profile Search for other posts by Igor
 
seco
Newbie
Newbie
Avatar

Joined: 25 January 2015
Location: Egypt
Online Status: Offline
Posts: 8
Posted: 26 January 2015 at 6:51am | IP Logged Quote seco

this is 6.1.3
i wanna know what does this function do
Back to Top View seco's Profile Search for other posts by seco
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 January 2015 at 6:53am | IP Logged Quote Igor

No clue, sorry, that stuff is way too old.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide