OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: MOST2K2 on November 21, 2022, 04:08:00 PM

Title: [Solved] Add Nginx Cache - text validation error
Post by: MOST2K2 on November 21, 2022, 04:08:00 PM
What i am doing wrong?
Text validation failed for cache path see attachment.

OPNsense 22.7.8-amd64
FreeBSD 13.1-RELEASE-p3
OpenSSL 1.1.1s 1 Nov 2022
Title: Re: Add Nginx Cache - text validation error
Post by: Fright on November 21, 2022, 08:39:11 PM
since its a "path", i think it should contain dir(s)  ;)
string will be validated against /\/(srv|var|tmp|mnt)[a-z0-9\-\._\:\,\/]+[a-z0-9\-\._\:\,]+/i regex
Title: Re: Add Nginx Cache - text validation error
Post by: MOST2K2 on November 21, 2022, 08:42:40 PM
Quote from: Fright on November 21, 2022, 08:39:11 PM
since its a "path", i think it should contain dir(s)  ;)
string will be validated against /\/(srv|var|tmp|mnt)[a-z0-9\-\._\:\,\/]+[a-z0-9\-\._\:\,]+/i regex

Thanks now its working. Where did you found the regex?
Title: Re: Add Nginx Cache - text validation error
Post by: Fright on November 21, 2022, 08:46:20 PM
https://github.com/opnsense/plugins/blob/9228eea5c7cd0509ee0ec1d66ef06b828e61f084/www/nginx/src/opnsense/mvc/app/models/OPNsense/Nginx/Nginx.xml#L1775
yes, some help text in Cache Path form would be helpful )
i'll try to make a pr
Title: Re: Add Nginx Cache - text validation error
Post by: MOST2K2 on November 21, 2022, 08:59:08 PM
Absolutely :-)