function hosting_https_filter_key in Aegir HTTPS 7.3
Filter disallowed characters from a HTTPS certificate key.
Only lowercase alphanumeric- and '.', '_' or '-' characters are allowed for HTTPS keys.
TODO: Validate that site URIs will work here. For example, do sub-directory sites need to be munged? example.com/site1 -> example.com_site1 ?
1 call to hosting_https_filter_key()
- hosting_https_get_key in ./
hosting_https.nodeapi.inc - Return the URI of a site, for use in generating HTTPS certificates.
File
- ./
hosting_https.nodeapi.inc, line 176 - NodeAPI functions for the Hosting HTTPS module.
Code
function hosting_https_filter_key($key) {
return strtolower(preg_replace("/[^\\w\\.\\-]/", "", $key));
}