[GH-ISSUE #176] [BUG] ENABLE_USER_DELETE_EMAIL 似乎不工作 #59

Closed
opened 2026-02-26 20:35:24 +03:00 by kerem · 3 comments
Owner

Originally created by @SunsetMkt on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/176

复现步骤

ENABLE_USER_DELETE_EMAIL 设为 false 时,重新部署,用户仍可删除邮件。

预期行为

ENABLE_USER_DELETE_EMAIL 设为 false 时,用户不可删除邮件。

部署方式

  • cli 部署
  • 用户界面部署

浏览器环境

Edg/124.0.0.0

可能的问题位置

github.com/dreamhunter2333/cloudflare_temp_email@23d1709ca1/worker/src/router.js (L175C16-L175C40)

// 一个猜测,不一定正确
// 当:
c.env.ENABLE_USER_DELETE_EMAIL = "false"

(!c.env.ENABLE_USER_DELETE_EMAIL)
// 即为
(!"false") = false

// TODO: 如果这个猜测成立,需要修改不止一处这样的问题。另外,需要注意,前端的行为不一定一致。
Originally created by @SunsetMkt on GitHub (Apr 29, 2024). Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/176 ## 复现步骤 ENABLE_USER_DELETE_EMAIL 设为 false 时,重新部署,用户仍可删除邮件。 ## 预期行为 ENABLE_USER_DELETE_EMAIL 设为 false 时,用户不可删除邮件。 ## 部署方式 - [ ] cli 部署 - [x] 用户界面部署 ## 浏览器环境 Edg/124.0.0.0 ## 可能的问题位置 https://github.com/dreamhunter2333/cloudflare_temp_email/blob/23d1709ca1aa36e946d69394996b3e89aa959565/worker/src/router.js#L175C16-L175C40 ```javascript // 一个猜测,不一定正确 // 当: c.env.ENABLE_USER_DELETE_EMAIL = "false" (!c.env.ENABLE_USER_DELETE_EMAIL) // 即为 (!"false") = false // TODO: 如果这个猜测成立,需要修改不止一处这样的问题。另外,需要注意,前端的行为不一定一致。 ```
kerem closed this issue 2026-02-26 20:35:25 +03:00
Author
Owner

@dreamhunter2333 commented on GitHub (Apr 29, 2024):

看起来应该是用户界面输入的所有变量都变成字符串了,我修改下这些bool变量的判断逻辑

<!-- gh-comment-id:2082434793 --> @dreamhunter2333 commented on GitHub (Apr 29, 2024): 看起来应该是用户界面输入的所有变量都变成字符串了,我修改下这些bool变量的判断逻辑
Author
Owner

@dreamhunter2333 commented on GitHub (Apr 29, 2024):

临时的解决方案是不配置这个参数,未配置会认为是 false

<!-- gh-comment-id:2082440837 --> @dreamhunter2333 commented on GitHub (Apr 29, 2024): 临时的解决方案是不配置这个参数,未配置会认为是 false
Author
Owner

@dreamhunter2333 commented on GitHub (May 2, 2024):

最新版已修复

https://github.com/dreamhunter2333/cloudflare_temp_email/releases/tag/v0.3.1

<!-- gh-comment-id:2089800561 --> @dreamhunter2333 commented on GitHub (May 2, 2024): 最新版已修复 https://github.com/dreamhunter2333/cloudflare_temp_email/releases/tag/v0.3.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudflare_temp_email#59
No description provided.