Author |
|
seco Newbie
Joined: 25 January 2015 Location: Egypt
Online Status: Offline Posts: 8
|
Posted: 26 January 2015 at 4:46am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 January 2015 at 4:48am | IP Logged
|
|
|
That's not possible, WebMail needs account password to tell it to IMAP server for authentication.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
seco Newbie
Joined: 25 January 2015 Location: Egypt
Online Status: Offline Posts: 8
|
Posted: 26 January 2015 at 5:01am | IP Logged
|
|
|
so how i can login with hashed password
or i have to store passwords in plain in db
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 January 2015 at 5:05am | IP Logged
|
|
|
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 |
|
|
seco Newbie
Joined: 25 January 2015 Location: Egypt
Online Status: Offline Posts: 8
|
Posted: 26 January 2015 at 5:36am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 January 2015 at 6:11am | IP Logged
|
|
|
That's libraries/MailSo/Imap/ImapClient.php file, see Login method there.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
seco Newbie
Joined: 25 January 2015 Location: Egypt
Online Status: Offline Posts: 8
|
Posted: 26 January 2015 at 6:15am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 January 2015 at 6:21am | IP Logged
|
|
|
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 |
|
|
seco Newbie
Joined: 25 January 2015 Location: Egypt
Online Status: Offline Posts: 8
|
Posted: 26 January 2015 at 6:47am | IP Logged
|
|
|
i found this file called integr.php
there is function called UserLoginByEmail it accepts null passwords
what this function do exactly?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 January 2015 at 6:49am | IP Logged
|
|
|
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 |
|
|
seco Newbie
Joined: 25 January 2015 Location: Egypt
Online Status: Offline Posts: 8
|
Posted: 26 January 2015 at 6:51am | IP Logged
|
|
|
this is 6.1.3
i wanna know what does this function do
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 January 2015 at 6:53am | IP Logged
|
|
|
No clue, sorry, that stuff is way too old.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|