IP filter list is broken (single IPs are taken as they ended with wildcards)

Description

Hi,

A single IP (without a wildcard) is taken as prefix, not as a single IP.  So, if we put in the filter a single IP as 192.168.1.1 it allows access to all ips of the pattern 192.168.1.1*  (i.e. wil allow not only 192.168.1.1 but all in the range of 192.168.1.1x and 192.168.1.1xx ) 

validateIP() in samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/delivery/DeliveryBean.java checks ip with startsWith()

Activity

Show:

Andrea Schmidt May 11, 2021 at 6:18 PM

Verified on 20x: https://qa20-mysql.nightly.sakaiproject.org/, build: 186d90ba 

Same variations tested as for trunk

Andrea Schmidt May 5, 2021 at 6:01 PM

Verified on 21x: https://qa21-mysql.nightly.sakaiproject.org/, build: a65af89d 

Same variations tested as for trunk

Andrea Schmidt May 3, 2021 at 5:49 PM

Verified on 22x: https://trunk-mysql.nightly.sakaiproject.org/, build: 048f5ecd

Tested the following:

68.50.236.1
68.50.236.*
68.50.236.114 (exact)

Student was not able to access the quiz when the IP address was set to 68.50.236.1

 

Fixed

Details

Priority

Affects versions

Fix versions

21 Status

Verified

Assignee

Reporter

Labels

Created April 20, 2021 at 8:33 AM
Updated May 11, 2021 at 6:19 PM
Resolved April 30, 2021 at 6:14 PM

Flag notifications