NAS 542 Firmware V5.21(ABAG.14) new Shared Folder name restrictions
I recently updated my firmware to the latest available version (after rolling back due to a reported issue with the .15 version causing the NAS to no longer boot).
Now, as I was inspecting some settings I noticed that one of my shared folders is marked as invalid due to it containing a ' in its name. This was not the case before and I don't plan on changing it, however I want to enable the recycle bin function to this folder and I cannot unless I also change its name.
This is dumb. Any way to enable this setting via SSH or otherwise to bypass the new (artificially) imposed ui limitation?
All Replies
-
The samba settings are stored in /etc/zyxel/ugs_conf.db, which is an sqlite3 database. The commandline tool sqlite3 is available on the box. After executing 'sqlite3 /etc/zyxel/ugs_conf.db' you can view the database with .dump. Then you see all shares in the form
INSERT INTO "smb_share" VALUES('Share','/path/to/Share','user-create','Comment','y','y','y',0,'n');
Don't know what all values mean, but the 3th 'y' in the line is about recycle bin. I suppose it's possible to 'UPDATE' the line. But I don't know how to put a single quote in one of the values. Maybe escape it?
or otherwise to bypass the new (artificially) imposed ui limitation?
The straight forward way is to downgrade, change your setting, and upgrade again.
I don't think it's just an ui limitation. I think a filter was added in the backend, to prevent code injection. As a single quote on the right place might enable code injection, it is filtered in the backend before processing it. The javascript validation in the frontend prevents you from entering data which will be silently filtered away.
0 -
I see, thank you for the info. I guess downgrading and upgrading would be the least painful approach in this situation, even though it feels kinda overkill.
0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 144 Nebula Ideas
- 94 Nebula Status and Incidents
- 5.6K Security
- 237 USG FLEX H Series
- 267 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.3K Consumer Product
- 247 Service & License
- 384 News and Release
- 83 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 71 Security Highlight