Project

General

Profile

« Previous | Next » 

Revision 99572c53

Added by Renato Botelho over 10 years ago

Remove multiple spaces from dns_split as a seatbelt, also fix the message since field is expected to be space separated and not comma. Ticket #4418

View differences:

usr/local/www/vpn_ipsec_mobile.php
146 146

  
147 147
	if ($pconfig['dns_split_enable']) {
148 148
		if (!empty($pconfig['dns_split'])) {
149
			/* Replace multiple spaces by single */
150
			$pconfig['dns_split'] = preg_replace('/\s+/', ' ', trim($pconfig['dns_split']));
149 151
			$domain_array=explode(' ', $pconfig['dns_split']);
150 152
			foreach ($domain_array as $curdomain) {
151 153
				if (!is_domain($curdomain)) {
......
513 515
										<input name="dns_split_enable" type="checkbox" id="dns_split_enable" value="yes" <?=$chk;?> onclick="dns_split_change()" />
514 516
									</td>
515 517
									<td>
516
										<?=gettext("Provide a list of split DNS domain names to clients. Enter a comma separated list."); ?><br />
518
										<?=gettext("Provide a list of split DNS domain names to clients. Enter a space separated list."); ?><br />
517 519
										<?=gettext("NOTE: If left blank, and a default domain is set, it will be used for this value."); ?>
518 520
									</td>
519 521
								</tr>

Also available in: Unified diff