Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow namespace URIs starting with https://

  • Loading branch information...
commit 2ba57af63d1449d3e5bbb29acac9a5347f912794 1 parent 95ba42b
@cygri authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/namespaces.class.php
  2. +1 −1  lib/site.class.php
View
2  lib/namespaces.class.php
@@ -132,7 +132,7 @@ function is_valid_namespace_URI($uri) {
// Not sure if this is quite correct. At least one alphanumeric
// character, must start and end alphanumeric, might contain dash
$domainpart = "([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)";
- return preg_match("!^http://$domainpart(\.$domainpart)+(:[0-9]+)?/([\!$&'()*+,;=._~?/:@%0-9a-zA-Z-]*[/#:])?$!", $uri);
+ return preg_match("!^https?://$domainpart(\.$domainpart)+(:[0-9]+)?/([\!$&'()*+,;=._~?/:@%0-9a-zA-Z-]*[/#:])?$!", $uri);
}
function get_prefix_regex() {
View
2  lib/site.class.php
@@ -203,7 +203,7 @@ function action_declare($prefix, $reference, $expansion) {
}
if (!$this->namespaces->is_valid_namespace_URI($expansion)) {
$this->namespaces->log_rejected_URI($prefix, $expansion, 'uri-syntax');
- $this->response->error(400, array('plaintext' => "URI must start with http://, end in / or : or #."));
+ $this->response->error(400, array('plaintext' => "URI must start with http:// or https://, end in / or : or #."));
}
if ($this->namespaces->mapping_exists($prefix, $expansion)) {
$this->response->error(400, array('plaintext' => "This mapping already exists."));
Please sign in to comment.
Something went wrong with that request. Please try again.