-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Repro is with Zui commit 45bfd7c.
A community user emailed [email protected] with this problem:
I installed Zui a few days ago and wasn't aware that it was pre-configured with Suricata rules. I tried to set it up with a rules file, using the option in settings to load a YAML file. However, after loading the rules file, I encountered an error when opening the settings. I attempted to resolve the issue by reinstalling Zui, but the error persists. I also tried renaming the rules file to prevent it from loading, but the error persists despite these efforts.
Based on this description, it sounds like the file they were trying to load was not of the specific structure of what's described in the docs but rather a file of actual Suricata rules or some Suricata YAML config file that points at rules. As shown in the video below, if I drag such a file into the app, now each time I try to go into Settings I get a stack dump like the user reported:
Error: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
at HTMLInputElement.set [as value] (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:7721)
at et (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:9350)
at file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:99982
at oS (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:103514)
at ow (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:96624)
at file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:96431
at ok (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:96438)
at os (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:93209)
at oi (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:9:91779)
at E (file:///_next/static/chunks/framework-d2a24e5002b8cad4.js:33:1373)
Repro.mp4
It seems we could stand to increase the robustness here such that if we don't see valid YAML or it's YAML but not of the expected structure we just surface an error saying it can't be used.