[Grbl_Esp32 Issue#568] does not compile with #define ENABLE_AUTHENTICATION

未分类 bolang 4个月前 (10-14) 44次浏览

Issue #568 | 状态: 已关闭 | 作者: joedirium | 创建时间: 2020-08-27

标签: bug


Please answer the following questions.

What version of the firmware are you using?
Checked out today, 2020.08.27

Is the problem repeatable?
yes

Under what conditions does the bug occur?

Enabled authentication in Config.h
C++
#define ENABLE_AUTHENTICATION
`

Was able to compile after three changes in WebServer.cpp:

line 595 / removed one bracket after exclamation mark:
`C++
if (!(sUser == DEFAULTADMINLOGIN && sPassword == sadminPassword) ||
`
lines 613-617 / added type conversions:
`C++
if (sUser == DEFAULTADMINLOGIN) {
err = adminpassword->setStringValue((char*)newpassword.cstr());
} else {
err = userpassword->setStringValue((char*)newpassword.cstr());
}

As I usually use Java or Python I am not that familiar with all the pointer and typecast issues in C++, so I hope these changes are OK. At least it compiled and login worked after uploading the new firmware.


评论 (1)

#1 – MitchBradley 于 2020-08-27

Fixed by #569


原始Issue: https://github.com/bdring/Grbl_Esp32/issues/568

喜欢 (0)