Project

General

Profile

« Previous | Next » 

Revision bdabc817

Added by Chris Buechler over 9 years ago

Validate IP passthrough bandwidth values within sane range. Ticket #5655

View differences:

src/usr/local/www/services_captiveportal_ip_edit.php
144 144
		$input_errors[] = gettext("Download speed needs to be an integer");
145 145
	}
146 146

  
147
	if ($_POST['bw_up'] && ($_POST['bw_up'] > 999999 || $_POST['bw_up'] < 1)) {
148
		$input_errors[] = gettext("Upload speed must be between 1 and 999999");
149
	}
150

  
151
	if ($_POST['bw_down'] && ($_POST['bw_down'] > 999999 || $_POST['bw_down'] < 1)) {
152
		$input_errors[] = gettext("Download speed must be between 1 and 999999");
153
	}
154

  
147 155
	foreach ($a_allowedips as $ipent) {
148 156
		if (isset($id) && ($a_allowedips[$id]) && ($a_allowedips[$id] === $ipent)) {
149 157
			continue;

Also available in: Unified diff