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_report] 邮箱授权码中含#导致的配置文件解析错误 #206

Closed
lzw-723 opened this issue Feb 17, 2023 · 3 comments
Closed

Comments

@lzw-723
Copy link

lzw-723 commented Feb 17, 2023

描述问题

189邮箱生成的授权码中含#导致配置文件解析错误。

重现步骤

.env中

# 机器人邮箱密码(Gmail 填应用专用密码,QQ 邮箱或 163 邮箱填授权码) Password of the robot email
MAIL_PASSWORD="Di#0J8=5u#8Ju!4B"

截图&日志

执行出错:Failed to parse dotenv file due to an unexpected escape sequence.

你做了哪些尝试

单引号改双引号

MAIL_PASSWORD="xxxx#xx"

环境信息

  • 系统: Ubuntu 20.04.4
  • PHP 版本: **
  • 脚本版本: v2.6
  • 是否 Docker: * 是*

额外的备注

  • 是否可以在.env中备注一下这种情况
@luolongfei
Copy link
Owner

实际上文档中有提到这种情况,你需要在“#”前面加上“\”进行转义,因为在 .env 中,“#”表示注释。

@luolongfei
Copy link
Owner

可以提个 pr

@lzw-723
Copy link
Author

lzw-723 commented Feb 18, 2023

谢谢解答,本人眼拙

@lzw-723 lzw-723 closed this as completed Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants