apache / apache/answer

Getting HTTP 302 -> /403 on displaying uploaded images after answer "update"

Đang mở
#722 13 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Go
Star
15.7k
Fork
1.4k
Merge trung bình
3 ngày 8 giờ
Pull request đã merge (30 ngày)
7

Mô tả

## Describe the bug

Not sure when it started (maybe with 1.2.1 or after running 1.2.1 for some days, but not sure), and have no idea how to analyze the following issue:

Uploading images works well, they're written to the `updates` folder in the file system.
But when displaying them, answer returns a HTTP 302 redirecting to `/403`.

Uploaded avatars and the brand image are still working.

There are no additional information in debug log, pardon me, I've no idea how to taggle this.

The installation is private, when changing it to public, images are shown. so it seems to be related to login session handling for images downloads.

### To Reproduce

Steps to reproduce the behavior:

1. having a private answer
1. deploy a rebuild answer binary (`answer build --with-plugins...`)
1. uploaded images result int http 302 -> /403 ![image](https://github.com/apache/incubator-answer/assets/40993644/09adc3e4-b87b-404e-96c1-875544851699)
1. clear cookie `visit` and reload page
1. uploaded images work again

### Expected behavior

Uploaded images continue to being shown also after answer updates

### Screenshots

If applicable, add screenshots or video to help explain your problem.

### Platform

- Device: Any
- OS: Official answer container image
- Version: v1.2.1 `--with-plugins`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Không có tệp mã nguồn hoặc bài kiểm thử nào được nêu. Hãy tái hiện vấn đề trên một bản cài đặt riêng bằng cách xây dựng lại binary Answer, sau đó kiểm tra đường dẫn tải xuống hình ảnh và cách xử lý phiên đăng nhập; công việc được xem là hoàn tất khi các hình ảnh đã tải lên vẫn có thể truy cập sau khi cập nhật mà không xóa visit cookie.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go
Lĩnh vực
authentication, backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.