Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getUserSession stores passwords #7199

Closed
jswlinux opened this issue Feb 14, 2014 · 14 comments
Closed

getUserSession stores passwords #7199

jswlinux opened this issue Feb 14, 2014 · 14 comments

Comments

@jswlinux
Copy link

I've developed my simple owncloud app, and did this print_r(OC_User::getUserSession()); due to some reason. I found two passwords.

Expected behavior:
The array would have needed information except an user's password.

Actual behavior:
Two passwords for a LDAP Bind and a current user were found.

Steps to reproduce
print_r(OC_User::getUserSession());

Server configuration:
OS: Ubuntu 12.04 64bit
Web server: Apache 2.2.22-1
Database: PostgreSQL 9.1
PHP v5.3.10-1
ownCloud 6 Enterprise Edition 6.0.1 Testing
Fresh installed

List of activated apps:
Activities
Deleted files
Export/import
Export/import for users
External storage support
First Run Wizard
Full Text Search
LDAP user and group backend
Share Files
Text Editor
Versions
WebDAV user backend

Client:
Chrome on Ubuntu 12.04 64bit

@karlitschek
Copy link
Contributor

@blizzz Any idea?

@DeepDiver1975
Copy link
Member

FYI: our irods external fs implementation is storing the user password in the session as well

@blizzz
Copy link
Contributor

blizzz commented Feb 14, 2014

The LDAP backend does not store them in the session, must happens somewhere else.

@blizzz
Copy link
Contributor

blizzz commented Feb 14, 2014

Alright, so what I see is that it prints the OC\User\Session instance.
It also holds the backend instances, i.e. all it's properties are shown as well.
The password with regard to LDAP that you see is that one for the bind user, required to accomplish the LDAP bind. No user password is kept.

It is not the PHP session.

@sfabel
Copy link

sfabel commented Feb 14, 2014

We can see the admin password in addition to the BIND PW.

@blizzz
Copy link
Contributor

blizzz commented Feb 14, 2014

Which admin password? Local user, LDAP user?

@sfabel
Copy link

sfabel commented Feb 14, 2014

Sorry, the local admin user (which was the user logged on at the moment).

@blizzz
Copy link
Contributor

blizzz commented Feb 14, 2014

I do not see the password of my (also local) user. We do not store it permanently anyway, it is used however for the login, obviously. For the login and attached processes (e.g. in encryption) the password is necessary i.e. it needs to be available in this time. Maybe there is a chance to clean this up, but it does not change anything about the fact that it needs to be processed on the login action. In other corner cases, as @DeepDiver1975 stated for IRODS the password must be kept since it needs to be passed on. Same is true for the LDAP Bind Password.

@sfabel
Copy link

sfabel commented Feb 14, 2014

Plaintext is pretty scary... If there's a way to avoid caching this (isn't this what a session is supposed to be?) Please change this. BIND user is understandable and no big deal. We will post output from what we see -I'll let my colleague know.

@jswlinux
Copy link
Author

Please see attached screenshot.

I blocked some sensitive info with yellow colored boxes. The blue colored is the BIND user's password, which is not a big deal. The red one is MY LDAP ACCOUNT PASSWORD.

owncloud_sessions

@sfabel
Copy link

sfabel commented Feb 18, 2014

Maybe we can modify this request (if irods requires it) to: don't store irods credentials if you don't have that external storage configured?

@jnfrmarks
Copy link

@LukasReschke

Should this issue be closed? I validated this fix along with PR 11747.

@LukasReschke
Copy link
Member

Once #12523 is merged.

@LukasReschke
Copy link
Member

Will be fixed with 7.0.4

@lock lock bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants