Projet

Général

Profil

« Précédent | Suivant » 

Révision 54a9da9f

Ajouté par Renato Botelho il y a presque 10 ans

Validate starttime and stoptime format

Voir les différences:

usr/local/www/firewall_schedule_edit.php
116 116
	$timerangeFound = false;
117 117
	for ($x=0; $x<99; $x++){
118 118
		if($_POST['schedule' . $x]) {
119
			if (!preg_match('/^[0-9]+:[0-9]+$/', $_POST['starttime' . $x])) {
120
				$input_errors[] = sprintf(gettext("Invalid start time - '%s'"), $_POST['starttime' . $x]);
121
				continue;
122
			}
123
			if (!preg_match('/^[0-9]+:[0-9]+$/', $_POST['stoptime' . $x])) {
124
				$input_errors[] = sprintf(gettext("Invalid start time - '%s'"), $_POST['stoptime' . $x]);
125
				continue;
126
			}
119 127
			$timerangeFound = true;
120 128
			$timeparts = array();
121 129
			$firstprint = false;

Formats disponibles : Unified diff