ufw

Please, make application profiles for ufw case insensitive

Bug #263757 reported by Didier Roche-Tolomelli
4
Affects Status Importance Assigned to Milestone
ufw
Fix Released
Wishlist
Didier Roche-Tolomelli

Bug Description

The idea here is to make ufw case insensitive regarding application profiles.

* Simple use-case:
Imagine you have a "Foo" profile:
$ sudo ufw app info Foo or $ sudo ufw app info foo should show the same information.

* If you have the profiles Foo and FoO:
$ sudo ufw app info FoO should refers to FoO and $ sudo app info Foo should refers to Foo
-> If one insensitive input correspond to two or more profiles, an error appears stopping the command.
To access to the exact profile, the previous usage is to define it with the correct case.

* Same behavior is attented for $ sudo ufw update <profile> and $ sudo ufw allow/deny <profile>
If the foo service is registered, it should not alter the current behavior: using the foo service for $ sudo ufw allow/deny …

* An informational message should be displayed for each command like:
Using "Foo" for "FoO"
when the exact match is not set.

-> Change the previous message text "Using Foo for foo" in a warning.

-> 2 different exact case inputs for the same profile (Apache and ApachE) to be sure that the right one is taken.

-> Add tests
     * for good insensitive profile handling (openNtpd for OpenNTPD)
     * for specific case sensiviness (Apache & ApachE)
     * for raising an Exception when 2 profiles correspond to a case insensitive input.

Adding extra tests had raised a bug for "extended rules". Fix provided with a smarter way to handle such a case in frontend.py (do_action command).

Changed in ufw:
assignee: nobody → didrocks
status: New → Confirmed
status: Confirmed → In Progress
description: updated
Changed in ufw:
importance: Undecided → Wishlist
description: updated
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks Didier! I reqorked your patch a bit and it is now in 0.24.

Changed in ufw:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.