File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
lizmap/modules/admin/controllers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
use Jelix \FileUtilities \Path ;
4
+ use Lizmap \Project \Repository ;
4
5
use Lizmap \Project \UnknownLizmapProjectException ;
5
6
use Lizmap \Request \Proxy ;
6
7
use LizmapAdmin \RepositoryRightsService ;
@@ -488,7 +489,7 @@ public function saveSection()
488
489
$ domain = 'https:// ' .$ domain ;
489
490
}
490
491
$ urlParts = parse_url ($ domain );
491
- if ($ urlParts === false ) {
492
+ if ($ urlParts === false || ! filter_var ( $ domain , FILTER_VALIDATE_URL ) ) {
492
493
$ form ->setErrorOn ('accessControlAllowOrigin ' , jLocale::get ('admin~admin.form.admin_section.message.accessControlAllowOrigin.bad.domain ' ));
493
494
$ ok = $ okDomain = false ;
494
495
@@ -530,7 +531,7 @@ public function saveSection()
530
531
531
532
// Repository data
532
533
$ data = array ();
533
- foreach (lizmapRepository ::getProperties () as $ prop ) {
534
+ foreach (Repository ::getProperties () as $ prop ) {
534
535
$ data [$ prop ] = $ form ->getData ($ prop );
535
536
// Check paths
536
537
if ($ prop == 'path ' ) {
You can’t perform that action at this time.
0 commit comments