Forums de discussion

can't access to users portrait images, img_id_token??

Frédéric Aubé, modifié il y a 9 années.

can't access to users portrait images, img_id_token??

Junior Member Publications: 37 Date d'inscription: 17/07/14 Publications récentes
Hi

I updated Liferay Portal Community Edition 6.2 CE GA2 to GA3
Now I can not access users portraits and my problem seems coming from auth tokens or something like that.

I used that url to get the images, all worked fine, before... :
http://<host>:<port>/image/user_portrait?img_id=<imageId>

If i add "&img_id_token=VHZY9BLxJNTuH3vX0vkzvDPzr8g%3D&t=1423724264923" to the url, its all good

What is that "img_id_token" and how do i get that in my jsp?
thumbnail
Tomas Polesovsky, modifié il y a 9 années.

RE: can't access to users portrait images, img_id_token??

Liferay Master Publications: 676 Date d'inscription: 13/02/09 Publications récentes
Hi Frédéric,

please use this code:
    String userPortraitURL = user.getPortraitURL(themeDisplay);


You can also turn off this protection in portal-ext.properties:
    users.image.check.token=false


The risk related to disabling the protection is that anybody is able to enumerate users profile pictures and identify users.
Frédéric Aubé, modifié il y a 9 années.

RE: can't access to users portrait images, img_id_token??

Junior Member Publications: 37 Date d'inscription: 17/07/14 Publications récentes
Thank you, both solutions work !
thumbnail
Mohammad Iqbal Khokhar, modifié il y a 8 années.

RE: can't access to users portrait images, img_id_token??

New Member Envoyer: 1 Date d'inscription: 30/03/15 Publications récentes
Hi Frédéric,

You can use following code for img_id_token.
img_id_token=
HttpUtil.encodeURL(DigesterUtil.digest(myUser.getUuid()))
Luciano Mendes do Prado, modifié il y a 7 années.

RE: can't access to users portrait images, img_id_token??

New Member Envoyer: 1 Date d'inscription: 11/08/16 Publications récentes
Hi Mohammad,

Thanks work!
safa safa, modifié il y a 7 années.

RE: can't access to users portrait images, img_id_token??

New Member Publications: 6 Date d'inscription: 06/10/16 Publications récentes
hi mouhamed
please could u help me .
it doesn't work for me . i don't know wath's the problem