incubator-answer
incubator-answer copied to clipboard
picture not diplay normally
Describe the bug The picture in comment not display normally
To Reproduce Steps to reproduce the behavior:
- install the answer by
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:latest - update my avartar, it shows normally
- post an answer
- the picture in the answer post did not diplay normally but I can find it in the volume /data/upload/post
Expected behavior The image shows normally
Screenshots
Platform (please complete the following information):
- Device: [e.g. Desktop, Mobile]
- OS: LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal
- Browser: microsoft Edge
- Version: docker image apache/answer latest d3da45f971e2 21 hours ago 110MB
@notfresh You can check as follows.
- Confirm that the image url can be accessed directly from your browser.
- Is there any error log output?
@LinkinStars the image can't be visited from brower, it redirect to another page with a tip 403
I use docker ps CONTAINER_NAME , only to find some log:
2023-12-01 05:01:36.106 ERROR gin/context.go:891 net/http: invalid Cookie.Domain "MyIP:9080"; dropping domain attribute
2023-12-01 05:01:38.155 ERROR gin/context.go:891 net/http: invalid Cookie.Domain "MyIP:9080"; dropping domain attribute
2023-12-01 05:02:09.515 ERROR gin/context.go:891 net/http: invalid Cookie.Domain "MyIP:9080"; dropping domain attribute
which was too old and not match the image error
I run docker deamon and docker container with the only user root.
@notfresh This issue has been asked before. FYI: https://github.com/apache/incubator-answer/issues/502#issuecomment-1818481179
@LinkinStars I have aquestions:
Why does the picture I set as my avatar which I upload could show on the web page normally?
As you said in the #502 issue, the problem could be settled with domain name , but why the avatar could show normlly IN IP VISIT MODE ?
Is there any authentication mechanism to block the picture by ip visit but no such a check on avatar? I have logged in the brower and with cookie open
@LinkinStars I have aquestions:
Why does the picture I set as my avatar which I upload could show on the web page normally?
As you said in the #502 issue, the problem could be settled with domain name , but why the avatar could show normlly IN IP VISIT MODE ?
Is there any authentication mechanism to block the picture by ip visit but no such a check on avatar? I have logged in the brower and with cookie open
@notfresh Thank you for your question. Yes, the two have different validation rules. Since avatars may come from different sources such as gravatar. So it is currently left open for avatars. Since the essential aspect of this requirement is actually that we don't want the content of the user's question or answer to be posted somewhere else in private mode. Surely, we will consider your point about private access for avatars though.
Turning off this configuration allows the images to be displayed correctly
So, this is a bug?, there is another way to solve it?, and keep the setting as "login required=true"?