留言板

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

Frédéric Aubé,修改在9 年前。

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

Junior Member 帖子: 37 加入日期: 14-7-17 最近的帖子
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,修改在9 年前。

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

Liferay Master 帖子: 676 加入日期: 09-2-13 最近的帖子
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é,修改在9 年前。

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

Junior Member 帖子: 37 加入日期: 14-7-17 最近的帖子
Thank you, both solutions work !
thumbnail
Mohammad Iqbal Khokhar,修改在8 年前。

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

New Member 发布: 1 加入日期: 15-3-30 最近的帖子
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,修改在7 年前。

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

New Member 发布: 1 加入日期: 16-8-11 最近的帖子
Hi Mohammad,

Thanks work!
safa safa,修改在7 年前。

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

New Member 帖子: 6 加入日期: 16-10-6 最近的帖子
hi mouhamed
please could u help me .
it doesn't work for me . i don't know wath's the problem