33 $parts = parse_url($url);
35 if (isset($parts[
'query'])) {
41 if (isset(
$query[self::KEY_MAC])) {
51 $parts[
'query'] = http_build_query(
$query);
70 $parts = parse_url($url);
72 if (isset($parts[
'query'])) {
78 if (!isset(
$query[self::KEY_MAC])) {
84 unset(
$query[self::KEY_MAC]);
86 if (isset(
$query[self::KEY_EXPIRES]) &&
$query[self::KEY_EXPIRES] < time()) {
93 $parts[
'query'] = http_build_query(
$query);
elgg_parse_str($str)
Elgg UTF-8 string functions.
const ELGG_HTTP_FORBIDDEN
Exception thrown if an argument is not of the expected type.
sign(string $url, string $expires=null)
Normalizes and signs the URL with SHA256 HMAC key.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
assertValid($url)
Assert that an url is signed correctly.
elgg_http_build_url(array $parts, bool $html_encode=true)
Builds a URL from the a parts array like one returned by parse_url().
elgg_http_add_url_query_elements(string $url, array $elements)
Sets elements in a URL's query string.
Component for creating signed URLs.
isValid(string $url)
Validates HMAC signature.
foreach($plugin_guids as $guid) if(empty($deactivated_plugins)) $url
elgg_normalize_url(string $url)
elgg_build_hmac($data)
Get an HMAC token builder/validator object.