The most common way to talk about an IP range is the CIDR notation, for example "157.93.48.0/22, 157.93.53.0/25, 157.93.54.0/25", instead of using an asterisk (current "157.93.48.*" notation), which limit the mask to /24. I think koha should handle both notations, or at least instead CIDR, which is much more flexible. As in the example also sometimes is necessary to deal with more than one subnet (comma separated) at the same time (I could fill another bug for this one). Of course all this is particularly useful to AutoLocation system preference.
Created attachment 131927 [details] [review] Bug 11180: IP branch attribute should accept CIDR notation This patch adds the ability to set more than ip to IP setting of a branch and also CIDR notation can recognised also. Test plan: 1) Change systempreference AutoLocation to "Yes" 2) Go to the library settings ( Administration -> Libraries ) and you can add only one ip at format xxx.xxx.xxx.xxx or xxx.xxx.* 3) Apply patch 4) Go to the library settings and you can enter to IP setting those ip(s) you want seperate by space in any format like xxx.xxx.xxx.xxx or xxx.xxx.xxx.0/24 or xxx.xxx.xxx.* or only one also on the same formats. 3) Logout 4) Try to login from an ip that not belong on the set of ip that you enter before and now CIDR notation can regognized also and also you can have more than one ip for restriction.
Created attachment 131933 [details] [review] Bug 11180: IP branch attribute should accept CIDR notation and add multiple ip This patch adds the ability to set more than ip to IP setting of a branch and also CIDR notation can recognised also. Test plan: 1) Change systempreference AutoLocation to "Yes" 2) Go to the library settings ( Administration -> Libraries ) and you can add only one ip at format xxx.xxx.xxx.xxx or xxx.xxx.* 3) Apply patch 4) Go to the library settings and you can enter to IP setting those ip(s) you want seperate by space in any format like xxx.xxx.xxx.xxx or xxx.xxx.xxx.0/24 or xxx.xxx.xxx.* or only one also on the same formats. 3) Logout 4) Try to login from an ip that not belong on the set of ip that you enter before and now CIDR notation can regognized also and also you can have more than one ip for restriction.
Created attachment 160669 [details] [review] Bug 11180: IP branch attribute should accept CIDR notation This patch adds the ability to set more than ip to IP setting of a branch and also CIDR notation can recognised also. Test plan: 1) Change systempreference AutoLocation to "Yes" 2) Go to the library settings ( Administration -> Libraries ) and you can add only one ip at format xxx.xxx.xxx.xxx or xxx.xxx.* 3) Apply patch 4) Go to the library settings and you can enter to IP setting those ip(s) you want seperate by space in any format like xxx.xxx.xxx.xxx or xxx.xxx.xxx.0/24 or xxx.xxx.xxx.* or only one also on the same formats. 3) Logout 4) Try to login from an ip that not belong on the set of ip that you enter before and now CIDR notation can regognized also and also you can have more than one ip for restriction.
Created attachment 160670 [details] [review] Bug 11180: IP branch attribute should accept CIDR notation and add multiple ip This patch adds the ability to set more than ip to IP setting of a branch and also CIDR notation can recognised also. Test plan: 1) Change systempreference AutoLocation to "Yes" 2) Go to the library settings ( Administration -> Libraries ) and you can add only one ip at format xxx.xxx.xxx.xxx or xxx.xxx.* 3) Apply patch 4) Go to the library settings and you can enter to IP setting those ip(s) you want seperate by space in any format like xxx.xxx.xxx.xxx or xxx.xxx.xxx.0/24 or xxx.xxx.xxx.* or only one also on the same formats. 3) Logout 4) Try to login from an ip that not belong on the set of ip that you enter before and now CIDR notation can regognized also and also you can have more than one ip for restriction.
Created attachment 160721 [details] [review] Bug 11180: IP branch attribute should accept CIDR notation and add multiple ip This patch adds the ability to set more than ip to IP setting of a branch and also CIDR notation can recognised also. Test plan: 1) Change systempreference AutoLocation to "Yes" 2) Go to the library settings ( Administration -> Libraries ) and you can add only one ip at format xxx.xxx.xxx.xxx or xxx.xxx.* 3) Apply patch 4) Go to the library settings and you can enter to IP setting those ip(s) you want seperate by space in any format like xxx.xxx.xxx.xxx or xxx.xxx.xxx.0/24 or xxx.xxx.xxx.* or only one also on the same formats. 3) Logout 4) Try to login from an ip that not belong on the set of ip that you enter before and now CIDR notation can regognized also and also you can have more than one ip for restriction.
Attempted to apply the batch, but encountered an Internal Server Error.
According to the logs, the error probably comes from the file : C4/Auth.pm
(In reply to Phan Tung Bui from comment #6) > Attempted to apply the batch, but encountered an Internal Server Error. Did you apply the database update? It looks like they forgot to mention that step in their test plan.
Yes I apply the DB. I try again and I have again the 500 error. What I do : 1) git reset 2) git pull 3) update the DB 4) apply the patch 5) update DB 6) go to koha and I have the 500 error and log : /inlibro/git/koha-master-dev-matthias/C4/Auth.pm has too many errors. Compilation failed in require at /inlibro/git/koha-master-dev-matthias/errors/500.pl line 21. BEGIN failed--compilation aborted at /inlibro/git/koha-master-dev-matthias/errors/500.pl line 21. I missed something ?
Please check the bug in the "See also" for an alternate implementation.