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

  • Mijzelf
    Mijzelf Posts: 2,788  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    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.

  • VL4DST3R
    VL4DST3R Posts: 9
    First Comment Friend Collector

    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.

Consumer Product Help Center