[Grbl_Esp32 PR#470] Authentication for new settings

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

Issue #470 | 状态: 已关闭 | 作者: MitchBradley | 创建时间: 2020-07-06


Compiling with ENABLE_AUTHENTICATION now works, and the authentication appears to work both from WebUI and line-oriented input sources (“clients”).

The command and GCode line parsing and execution structure were re-factored so lots of formerly-separate code paths now go through common code. In particular, the GCode line normalization – space/comment removal and upper case conversion – is now done in one place, just prior to GCode parsing. That eliminates the need to do it separately for various input paths like serial, SPIFFS, SD, web, etc. The normalization code is quite efficient so the impact on performance should be minimal.

Another related change was to maintain separate line input buffers for different “clients”, so, for example, telnet input and serial input are separate – not interspersed into one line.

Every setting and command can have permissions, so authentication could potentially be applied to legacy GRBL settings in addition to WebUI settings. For now, all legacy settings and commands are open, requiring no authentication.

Authentication can be supplied via login in the WebUI case, or on the command line for various serial-like
input sources. Authentication applies also to listing functions, so you cannot bypass authentication with $S. Attempts to list protected settings show the setting name, but obscure the value.

原始Issue: https://github.com/bdring/Grbl_Esp32/pull/470

喜欢 (0)