Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit b42a80f

Browse files
committed
add check for valid uri
1 parent 7b0f820 commit b42a80f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

application/controllers/ModelController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,13 @@ public function createAction()
503503
);
504504
$this->view->errorFlag = true;
505505
return;
506+
} else if (substr($newModelUri, 0, 8) != 'https://'
507+
&& substr($newModelUri, 0, 7) != 'http://'
508+
&& substr($newModelUri, 0, 4) != 'urn:'
509+
) {
510+
$this->_owApp->appendMessage(
511+
new OntoWiki_Message('The given String is no legal URI (http://...)', OntoWiki_Message::ERROR)
512+
);
506513
} else {
507514
// model does not exist, will be created
508515
$model = $store->getNewModel(

0 commit comments

Comments
 (0)