Foros de discusión

PortalUtil.getUserPassword(httpRequest) API returns null

Chad Allen, modificado hace 13 años.

PortalUtil.getUserPassword(httpRequest) API returns null

New Member Mensajes: 16 Fecha de incorporación: 10/06/10 Mensajes recientes
The following scenario was working in 6.0.1, but after upgrading to 6.0.4 GA, the behavior is different.

Scenario - using an SDK hook, I am adding a custom LoginPostAction class to the login.events.post property in portal.properties. The custom action calls into PortalUtil.getUserPassword(request) to retrieve the user password typed into the sign-in portlet.

In 6.0.1, it returned the password, as it was typed in. However, in 6.0.4, the getUserPassword() call returns null.

Does anyone have an idea as to what may have changed here?

Thanks-
Chad Allen, modificado hace 13 años.

RE: PortalUtil.getUserPassword(httpRequest) API returns null

New Member Mensajes: 16 Fecha de incorporación: 10/06/10 Mensajes recientes
Has anyone else run into this, or been able to confirm my findings? Is this the right place to post such queries?
Dave Godbey, modificado hace 13 años.

RE: PortalUtil.getUserPassword(httpRequest) API returns null

New Member Mensajes: 9 Fecha de incorporación: 28/06/10 Mensajes recientes
I updated from Liferay 5.2.3 to 6.0.5. Between these two versions, I can corroborate what you have observed. I hope they plan to fix this, otherwise I'm going to need to find another way to get the password.

What would be better is if there was a way to insert a PortalPrincipal object during login.
Dave Godbey, modificado hace 13 años.

RE: PortalUtil.getUserPassword(httpRequest) API returns null

New Member Mensajes: 9 Fecha de incorporación: 28/06/10 Mensajes recientes
I think I've figured this out. Looks like they decided allowing the password to propagate in the session was a security risk, and turn this off by default. Probably the right thing to do.

To turn back on the behavior of returning the password with PortalUtil, add this to your portal-ext.properties file:

session.store.password=true
Chad Allen, modificado hace 13 años.

RE: PortalUtil.getUserPassword(httpRequest) API returns null

New Member Mensajes: 16 Fecha de incorporación: 10/06/10 Mensajes recientes
Thanks for your reply. This was very helpful.
thumbnail
Jacob Caniparoli, modificado hace 12 años.

RE: PortalUtil.getUserPassword(httpRequest) API returns null

Junior Member Mensajes: 27 Fecha de incorporación: 22/06/10 Mensajes recientes
I am having the same problem in 6.0.11, did this solution work for you?