Bug #3344
After deleting a filter into "Web content filter" you cannot manage the previously associate profile
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-squidguard | |||
Target version: | v6.7 | |||
Security class: | Resolution: | |||
Affected version: | v6.7 | NEEDINFO: | No |
Description
Steps to reproduce:
- create a custom filter;
- add a new profile associated to the filter just created;
- delete the custom filter (you'll get an error by server-manager but the filter has gone!);
- try to manage (modify or delete) the orphan profile.
deleting the filter, in "/var/log/messages
" you get:
Jan 19 12:48:37 mynsrv esmith::event[5492]: Event: nethserver-squidguard-save Jan 19 12:48:37 mynsrv esmith::event[5492]: expanding /etc/squid/squid.conf Jan 19 12:48:37 mynsrv esmith::event[5492]: expanding /etc/squid/squidGuard.conf Jan 19 12:48:37 mynsrv esmith::event[5492]: ERROR in /etc/e-smith/templates//etc/squid/squidGuard.conf/99acl20profiles: Program fragment delivered error <<Can't call method "prop" on an undefined value at /etc/e-smith/templates//etc/squid/squidGuard.conf/99acl20profiles line 14.>> at template line 1 Jan 19 12:48:37 mynsrv esmith::event[5492]: ERROR: Template processing failed for //etc/squid/squidGuard.conf: 1 fragment generated errors Jan 19 12:48:37 mynsrv esmith::event[5492]: at /etc/e-smith/events/actions/generic_template_expand line 64 Jan 19 12:48:37 mynsrv esmith::event[5492]: [WARNING] expansion of /etc/squid/squidGuard.conf failed Jan 19 12:48:37 mynsrv esmith::event[5492]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.181127] Jan 19 12:48:38 mynsrv esmith::event[5492]: ERROR in /etc/e-smith/templates//etc/squid/squidGuard.conf/99acl20profiles: Program fragment delivered error <<Can't call method "prop" on an undefined value at /etc/e-smith/templates//etc/squid/squidGuard.conf/99acl20profiles line 14.>> at template line 1 Jan 19 12:48:38 mynsrv esmith::event[5492]: ERROR: Template processing failed for //etc/squid/squidGuard.conf: 1 fragment generated errors Jan 19 12:48:38 mynsrv esmith::event[5492]: at /sbin/e-smith/expand-template line 45 Jan 19 12:48:39 mynsrv esmith::event[5492]: Action: /etc/e-smith/events/nethserver-squidguard-save/S2nethserver-squidguard-update-custom-list SUCCESS [1.170777] Jan 19 12:48:39 mynsrv esmith::event[5492]: [INFO] service squid reload Jan 19 12:48:39 mynsrv esmith::event[5492]: 2016/01/19 12:48:39| Warning: empty ACL: acl no_cache dstdomain "/etc/squid/acls/no_cache.acl" Jan 19 12:48:39 mynsrv esmith::event[5492]: [INFO] squid reload Jan 19 12:48:39 mynsrv esmith::event[5492]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.170898] Jan 19 12:48:39 mynsrv esmith::event[5492]: Event: nethserver-squidguard-save FAILED
in "/var/log/httpd-admin/access_log
" you get:
192.168.5.25 - - [19/Jan/2016:12:48:39 +0100] "GET /en-US/Tracker/810db0e7b64f79dfed7640275e37420b.json?_=1453203363054 HTTP/1.1" 200 430 192.168.5.25 - - [19/Jan/2016:12:48:39 +0100] "GET /en-US/ContentFilter/Filters/read.json?taskStatus=failure&taskId=810db0e7b64f79dfed7640275e37420b&_=1453203363055 HTTP/1.1" 200 447
Then, trying to manage the profile, in "/var/log/httpd-admin/access_log
" you get:
192.168.5.25 - - [19/Jan/2016:12:52:54 +0100] "GET /en-US/ContentFilter/Profiles/delete/profile01.json?_=1453204357955 HTTP/1.1" 400 984
The system should prevent the deletion of used filters.
Packages installed:
- nethserver-squid-1.3.11-1.ns6.noarch
- nethserver-squidguard-1.4.1-1.ns6.noarch
- squid-3.3.13-1.el6.x86_64
- squidGuard-1.4-9.el6.x86_64
Associated revisions
Web UI: add system validator for object delete. Refs #3344
History
#1 Updated by Giacomo Sanchietti over 5 years ago
- Category set to nethserver-squidguard
#2 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from NEW to TRIAGED
- Target version set to v6.7
- % Done changed from 0 to 20
#3 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Giacomo Sanchietti
- % Done changed from 20 to 30
#4 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 60
The same problem will arise if a time used inside a profile is deleted.
Created a new system validator to check if a filter or a time is used inside a profile.
#5 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from MODIFIED to ON_QA
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 60 to 70
Package in nethserver-testing:
- nethserver-squidguard-1.4.1-1.1.gc08d28f.ns6.noarch.rpm
- Check the bug is not reproducible
- The system must raise a validation error
- Create a custom time
- Add a new profile associated to the time just created
- Delete the custom time
- The system must raise a validation error
- Create a new filter, do not use it any profile
- Try to delete, the system should not raise any error
- Create a new time, do not use it any profile
- Try to delete, the system should not raise any error
#6 Updated by Davide Marini over 5 years ago
- Assignee set to Davide Marini
#7 Updated by Davide Marini over 5 years ago
- Status changed from ON_QA to VERIFIED
- % Done changed from 70 to 90
everything works as expected.
#8 Updated by Giacomo Sanchietti over 5 years ago
- Assignee deleted (
Davide Marini)
#9 Updated by Giacomo Sanchietti over 5 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
Released in 6.7 updates:
- nethserver-squidguard-1.4.2-1.ns6.noarch.rpm
- nethserver-squidguard-1.4.2-1.2.g991fb92.ns7.noarch.rpm