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 #194

Open
SkinAir opened this issue Jan 11, 2023 · 5 comments
Open

bug_report #194

SkinAir opened this issue Jan 11, 2023 · 5 comments

Comments

@SkinAir
Copy link

SkinAir commented Jan 11, 2023

描述问题

执行出错:Failed to parse dotenv file due to an unexpected escape sequence. Failed at
密码存在#和\,会抛出异常
因为两种方式他都报错了,我也无法分辨到底是密码错误,还是我的转义方式是正确的...

重现步骤

当密码存在\时会抛出错误,图中第一次是写了两个\(密码包含一个\),是我尝试使用\来转义\,但报错为[#56](https://github.com/luolongfei/freenom/issues/56)
第二次为删除手动添加的\,也是是密码只有一个\的状态,抛出错误Failed to parse dotenv file due to an unexpected escape sequence. Failed at

截图&日志
image

你做了哪些尝试

手动尝试添加\

环境信息

  • 系统: * ubuntu20 *
  • PHP 版本: (x)
  • 脚本版本: (x)
  • 是否 Docker: (例如 是)

额外的备注
-部署过程为采用一键脚本

docker run -d --name freenom --restart always -v $(pwd):/conf -v $(pwd)/logs:/app/logs luolongfei/freenom

部署完成后修改当前目录的.env文件

@luolongfei
Copy link
Owner

luolongfei commented Jan 11, 2023

你的例子比较特殊。如果密码中含有“\”,你可以试试用\\\\代替,具体 .env 文件的解析是 dotenv 库在处理,底层如何实现我暂时没时间去看。

@luolongfei
Copy link
Owner

luolongfei commented Jan 11, 2023

一般字符是直接用“\”转义,但是对“\”本身转义不能直接写作\\,一般在正则里是四个“\”代表一个“\”。

@SkinAir
Copy link
Author

SkinAir commented Jan 12, 2023

一般字符是直接用“\”转义,但对“\”本转义不能直接写\\,一般在正则里是四个“\”代表一个“\”。

修改后依旧报错
出错:获取域名状态页面出错,可能是未登录或者登录失效,请重试。(Error code: 34520009)
我无法分辨是密码错误还是其他问题.

@luolongfei
Copy link
Owner

你能不能换个密码

@luolongfei
Copy link
Owner

换个密码不就能判断了

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