WongSaang / chatgpt-ui

A ChatGPT web client that supports multiple users, multiple languages, and multiple database connections for persistent data storage. Provides Docker images and quick deployment scripts.
https://wongsaang.github.io/chatgpt-ui/
MIT License
1.49k stars 325 forks source link

[BUG] 通过修改聊天url路径后面的数字可以看到别人(其他账号)的聊天 #173

Open Yuki001 opened 1 year ago

Yuki001 commented 1 year ago

例如我自己的聊天 http://xxx/10 把后面的10 改成任意前面的数字,就能看到其他人(其他账号)的聊天 预期是如果这个聊天不属于自己的账号,应该是看不到,给返回一个错误信息才对。

ghost commented 1 year ago

可以通过改这一行解决 https://github.com/WongSaang/chatgpt-ui-server/blob/main/chat/views.py#L68

            queryset = queryset.filter(conversation__user=self.request.user).filter(conversation_id=conversationId).order_by('created_at')