Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] DISABLE_GPT4漏洞:未刷新的前端仍能访问后端接口 #1815

Closed
1 task done
Dar-Xs opened this issue Jun 5, 2023 · 0 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@Dar-Xs
Copy link

Dar-Xs commented Jun 5, 2023

bug 描述
二次部署时设置了环境变量 DISABLE_GPT4=1,刷新前端页面,曾经使用GPT4打开的聊天窗口仍能继续使用GPT4。

重现
重现该行为的步骤:

  1. 正常部署 ChatGPT-Next-Web
  2. 前端输入对应访问码并设置聊天模型为 GPT4
  3. 在聊天窗口中随意对话,以保留改聊天历史
  4. 二次部署,同时设置环境变量 DISABLE_GPT4=1
  5. 刷新前端页面,曾经使用 GPT4 打开的聊天窗口仍能继续使用 GPT4

预期行为
曾经使用 GPT4 打开的聊天窗口即使通过修改网页代码选中了 GPT4 API,后端也不应受理该请求。

截图
image
image
未更新的前端API选项,虽然范围已经限缩,但旧的选项仍然被选中。

image 此时GPT4能正常使用,怀疑是后端仍然存在 GPT4 API

部署

  • Vercel
    第二次部署使用了构建缓存

Desktop (please complete the following information):

  • OS: macOS 13.4 (22F66)
  • Browser: Safari 16.5 (18615.2.9.11.4)

Additional Logs
Add any logs about the problem here.

@Dar-Xs Dar-Xs changed the title [Bug] DISABLE_GPT4漏洞;未刷新的前端仍能访问后端接口 [Bug] DISABLE_GPT4漏洞:未刷新的前端仍能访问后端接口 Jun 5, 2023
@Yidadaa Yidadaa added the bug Something isn't working label Jun 5, 2023
@Yidadaa Yidadaa closed this as completed in 37da759 Jun 6, 2023
Yidadaa added a commit that referenced this issue Jun 6, 2023
fix: #1815 refuse to serve when disable gpt4
jinker pushed a commit to jinker/ChatGPT-Next-Web that referenced this issue Jun 19, 2023
jinker pushed a commit to jinker/ChatGPT-Next-Web that referenced this issue Jun 19, 2023
alchemist139 pushed a commit to alchemist139/ChatGPT-Next-Web that referenced this issue Sep 21, 2023
alchemist139 pushed a commit to alchemist139/ChatGPT-Next-Web that referenced this issue Sep 21, 2023
alchemist139 pushed a commit to alchemist139/ChatGPT-Next-Web that referenced this issue Sep 21, 2023
chenzeyu pushed a commit to neutronsg/ChatGPT-Next-Web that referenced this issue Nov 8, 2023
chenzeyu pushed a commit to neutronsg/ChatGPT-Next-Web that referenced this issue Nov 8, 2023
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this issue May 16, 2024
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this issue May 16, 2024
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants