Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow spaces in proxy filter profile name #6043

Closed
francio87 opened this issue Jan 31, 2020 · 5 comments
Closed

Don't allow spaces in proxy filter profile name #6043

francio87 opened this issue Jan 31, 2020 · 5 comments
Labels
bug A defect of the software verified All test cases were verified successfully

Comments

@francio87
Copy link
Member

NethServer 7.7.1908

Do not allow spaces in proxy profiles name from cockpit profile creation wizard

If you fill a "Name" with a space inside ie. "my rule" it will break the udfbGuard cfg.

Steps to reproduce

  • Web Proxy & Filter -> Filter -> Add profile
  • Step 4: Name & Description

You will find this messages inside the logs:

2020-01-30 13:11:55 [16225] loading URL table from "/var/squidGuard/blacklists/isp/domains"
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 280: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 280: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 280: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 280: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 281: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 281: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 281: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 283: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 289: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 289: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 289: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 289: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 290: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 290: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 290: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 290: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 290: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 290: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 291: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 293: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 293: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 294: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 294: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 294: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 294: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 294: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 294: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 294: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 295: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 295: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 296: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: line 298: syntax error in configuration file /etc/ufdbguard/ufdbGuard.conf  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225]
2020-01-30 13:11:55 [16225]    FATAL ERROR: "default" ACL is not defined  *****
2020-01-30 13:11:55 [16225]    
2020-01-30 13:11:55 [16225] ERROR: source "src_Block" has no ACL.  *****
2020-01-30 13:11:55 [16225]    This most likely may lead to unexpected results when the source is matched.  *****
2020-01-30 13:11:55 [16225]    It is strongly suggested to remove the source definition OR add the source to the acl.  *****
2020-01-30 13:11:55 [16225] raising privileges to write pid file
2020-01-30 13:11:55 [16225] dropped privileges and became user 'ufdb'
2020-01-30 13:11:55 [16225] PID 16225 written to /var/run/ufdbguard/ufdbguardd.pid

and here' s it's the generated cfg from the Web UI:

280 src src_Block Porn {
281     ip 192.168.110.0/24
282 
283 }
284 
285 
286 acl {
287 
288     # Profile: Block Porn
289     src_Block Porn  {
290         pass !security !"porn"  all
291     }
292 
293     default {
294         pass !security nh_whitelist  !nh_blacklist  !in-addr  all
295         redirect     http://192.168.110.1/cgi-bin/nethserver-block.cgi?clientaddr=%a&clientname=%n&clientident=%i&srcclass=%s        &targetgroup=%t&url=%u
296     }
297 
298 }

As you can see the issue is in "src_Block Porn", should not be allowed to contain a space.

Link to the discussion on the community: https://community.nethserver.org/t/webfilter-profile-issue/14542

@francio87 francio87 added the bug A defect of the software label Jan 31, 2020
@gsanchietti gsanchietti self-assigned this Feb 3, 2020
gsanchietti added a commit to NethServer/nethserver-squid that referenced this issue Feb 4, 2020
@nethbot
Copy link
Member

nethbot commented Feb 4, 2020

in 7.7.1908/testing:

@gsanchietti
Copy link
Member

Test case
Check the bug is not reproducible

@gsanchietti gsanchietti removed their assignment Feb 4, 2020
@gsanchietti gsanchietti added the testing Packages are available from testing repositories label Feb 4, 2020
@nethbot
Copy link
Member

nethbot commented Feb 5, 2020

in 7.7.1908/testing:

@mamengoni
Copy link

Tested and verified:

Schermata da 2020-02-05 10-21-09

@cotosso cotosso added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Feb 5, 2020
@DavidePrincipi DavidePrincipi added this to ⚙ Developing in NethServer 7 Feb 5, 2020
@gsanchietti
Copy link
Member

Released in nethserver-squid-1.10.6-1.ns7.noarch.rpm

NethServer 7 automation moved this from ⚙ Developing to 🗑 Done Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect of the software verified All test cases were verified successfully
Projects
No open projects
NethServer 7
🗑 Done
Development

No branches or pull requests

5 participants