ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
RFC822.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
75{
80 public string $address = '';
81
86 public string $default_domain = 'localhost';
87
92 public bool $nestGroups = true;
93
98 public bool $validate = true;
99
104 public array $addresses = [];
105
110 public array $structure = [];
111
116 public ?string $error = null;
117
122 public ?int $index = null;
123
129 public int $num_groups = 0;
130
136 public bool $mailRFC822 = true;
137
142 public ?int $limit = null;
143
154 public function __construct(
155 ?string $address = null,
156 ?string $default_domain = null,
157 ?bool $nest_groups = null,
158 ?bool $validate = null,
159 ?int $limit = null
160 ) {
161 if (isset($address)) {
162 $this->address = $address;
163 }
164 if (isset($default_domain)) {
165 $this->default_domain = $default_domain;
166 }
167 if (isset($nest_groups)) {
168 $this->nestGroups = $nest_groups;
169 }
170 if (isset($validate)) {
171 $this->validate = $validate;
172 }
173 if (isset($limit)) {
174 $this->limit = $limit;
175 }
176 }
177
189 public function parseAddressList(
190 ?string $address = null,
191 ?string $default_domain = null,
192 ?bool $nest_groups = null,
193 ?bool $validate = null,
194 ?int $limit = null
195 ): array {
196 if (!isset($this, $this->mailRFC822)) {
197 $obj = new Mail_RFC822($address, $default_domain, $nest_groups, $validate, $limit);
198 return $obj->parseAddressList();
199 }
200
201 if (isset($address)) {
202 $this->address = $address;
203 }
204 if (isset($default_domain)) {
205 $this->default_domain = $default_domain;
206 }
207 if (isset($nest_groups)) {
208 $this->nestGroups = $nest_groups;
209 }
210 if (isset($validate)) {
211 $this->validate = $validate;
212 }
213 if (isset($limit)) {
214 $this->limit = $limit;
215 }
216
217 $this->structure = [];
218 $this->addresses = [];
219 $this->error = null;
220 $this->index = null;
221
222 // Unfold any long lines in $this->address.
223 $this->address = preg_replace('/\r?\n/', "\r\n", $this->address);
224 $this->address = preg_replace('/\r\n(\t| )+/', ' ', $this->address);
225
226 while ($tmp_address = $this->_splitAddresses($this->address)) {
227 $this->address = $tmp_address;
228 }
229
230 if ($tmp_address === false || isset($this->error)) {
231 // mjansen patch 14 Ap 2016 start
232 throw new ilMailException($this->error);
233 // mjansen patch 14 Ap 2016 end
234 }
235
236 // Validate each address individually. If we encounter an invalid
237 // address, stop iterating and return an error immediately.
238 foreach ($this->addresses as $address) {
239 $valid = $this->_validateAddress($address);
240
241 if ($valid === false || isset($this->error)) {
242 // mjansen patch 14 Ap 2016 start
243 throw new ilMailException($this->error);
244 // mjansen patch 14 Ap 2016 end
245 }
246
247 if (!$this->nestGroups) {
248 $this->structure = array_merge($this->structure, $valid);
249 } else {
250 $this->structure[] = $valid;
251 }
252 }
253
254 return $this->structure;
255 }
256
263 protected function _splitAddresses(string $address)
264 {
265 if (!empty($this->limit) && count($this->addresses) === $this->limit) {
266 return false;
267 }
268
269 if (!isset($this->error) && $this->_isGroup($address)) {
270 $split_char = ';';
271 $is_group = true;
272 } elseif (!isset($this->error)) {
273 $split_char = ',';
274 $is_group = false;
275 } elseif (isset($this->error)) {
276 return false;
277 }
278
279 // Split the string based on the above ten or so lines.
280 $parts = explode($split_char, $address);
281 $string = $this->_splitCheck($parts, $split_char);
282
283 // If a group...
284 if ($is_group) {
285 // If $string does not contain a colon outside of
286 // brackets/quotes etc then something's fubar.
287
288 // First check there's a colon at all:
289 if (strpos($string, ':') === false) {
290 $this->error = 'Invalid address: ' . $string;
291 return false;
292 }
293
294 // Now check it's outside of brackets/quotes:
295 if (!$this->_splitCheck(explode(':', $string), ':')) {
296 return false;
297 }
298
299 // We must have a group at this point, so increase the counter:
300 $this->num_groups++;
301 }
302
303 // $string now contains the first full address/group.
304 // Add to the addresses array.
305 $this->addresses[] = [
306 'address' => trim($string),
307 'group' => $is_group,
308 ];
309
310 // Remove the now stored address from the initial line, the +1
311 // is to account for the explode character.
312 $address = trim((string) substr($address, strlen($string) + 1));
313
314 // If the next char is a comma and this was a group, then
315 // there are more addresses, otherwise, if there are any more
316 // chars, then there is another address.
317 if ($is_group && $address !== '' && str_starts_with($address, ',')) {
318 $address = trim(substr($address, 1));
319 }
320
321 return $address;
322 }
323
330 protected function _isGroup(string $address): bool
331 {
332 // First comma not in quotes, angles or escaped:
333 $parts = explode(',', $address);
334 $string = $this->_splitCheck($parts, ',');
335
336 // Now we have the first address, we can reliably check for a
337 // group by searching for a colon that's not escaped or in
338 // quotes or angle brackets.
339 if (count($parts = explode(':', $string)) > 1) {
340 $string2 = $this->_splitCheck($parts, ':');
341 return ($string2 !== $string);
342 }
343
344 return false;
345 }
346
354 protected function _splitCheck(array $parts, string $char): string
355 {
356 $string = $parts[0];
357
358 for ($i = 0, $iMax = count($parts); $i < $iMax; $i++) {
359 if ($this->_hasUnclosedQuotes($string)
360 || $this->_hasUnclosedBrackets($string, '<>')
361 || $this->_hasUnclosedBrackets($string, '[]')
362 || $this->_hasUnclosedBrackets($string, '()')
363 || substr($string, -1) === '\\') {
364 if (isset($parts[$i + 1])) {
365 $string .= $char . $parts[$i + 1];
366 } else {
367 $this->error = 'Invalid address spec. Unclosed bracket or quotes';
368 return '';
369 }
370 } else {
371 $this->index = $i;
372 break;
373 }
374 }
375
376 return $string;
377 }
378
385 protected function _hasUnclosedQuotes(string $string): bool
386 {
387 $string = trim($string);
388 $iMax = strlen($string);
389 $in_quote = false;
390 $i = $slashes = 0;
391
392 for (; $i < $iMax; ++$i) {
393 switch ($string[$i]) {
394 case '\\':
395 ++$slashes;
396 break;
397
398 case '"':
399 if ($slashes % 2 === 0) {
400 $in_quote = !$in_quote;
401 }
402 // Fall through to default action below.
403
404 // no break
405 default:
406 $slashes = 0;
407 break;
408 }
409 }
410
411 return $in_quote;
412 }
413
422 protected function _hasUnclosedBrackets(string $string, string $chars): bool
423 {
424 $num_angle_start = substr_count($string, $chars[0]);
425 $num_angle_end = substr_count($string, $chars[1]);
426
427 $this->_hasUnclosedBracketsSub($string, $num_angle_start, $chars[0]);
428 $this->_hasUnclosedBracketsSub($string, $num_angle_end, $chars[1]);
429
430 if ($num_angle_start < $num_angle_end) {
431 $this->error = 'Invalid address spec. Unmatched quote or bracket (' . $chars . ')';
432 return false;
433 }
434
435 return ($num_angle_start > $num_angle_end);
436 }
437
446 protected function _hasUnclosedBracketsSub(string $string, int &$num, string $char): int
447 {
448 $parts = explode($char, $string);
449 for ($i = 0, $iMax = count($parts); $i < $iMax; $i++) {
450 if (substr($parts[$i], -1) === '\\' || $this->_hasUnclosedQuotes($parts[$i])) {
451 $num--;
452 }
453 if (isset($parts[$i + 1])) {
454 $parts[$i + 1] = $parts[$i] . $char . $parts[$i + 1];
455 }
456 }
457
458 return $num;
459 }
460
467 protected function _validateAddress(array $address)
468 {
469 $is_group = false;
470 $addresses = [];
471
472 if ($address['group']) {
473 $is_group = true;
474
475 // Get the group part of the name
476 $parts = explode(':', $address['address']);
477 $groupname = $this->_splitCheck($parts, ':');
478 $structure = [];
479
480 // And validate the group part of the name.
481 if (!$this->_validatePhrase($groupname)) {
482 $this->error = 'Group name did not validate.';
483 return false;
484 }
485
486 if ($this->nestGroups) {
487 // Don't include groups if we are not nesting
488 // them. This avoids returning invalid addresses.
489 $structure = new stdClass();
490 $structure->groupname = $groupname;
491 }
492
493 $address['address'] = ltrim(substr($address['address'], strlen($groupname . ':')));
494 }
495
496 // If a group then split on comma and put into an array.
497 // Otherwise, Just put the whole address in an array.
498 if ($is_group) {
499 while (strlen($address['address']) > 0) {
500 $parts = explode(',', $address['address']);
501 $addresses[] = $this->_splitCheck($parts, ',');
502 $address['address'] = trim(substr($address['address'], strlen(end($addresses) . ',')));
503 }
504 } else {
505 $addresses[] = $address['address'];
506 }
507
508 // Trim the whitespace from all of the address strings.
509 array_map('trim', $addresses);
510
511 // Validate each mailbox.
512 // Format could be one of: name <geezer@domain.com>
513 // geezer@domain.com
514 // geezer
515 // ... or any other format valid by RFC 822.
516 for ($i = 0, $iMax = count($addresses); $i < $iMax; $i++) {
517 if (!$this->validateMailbox($addresses[$i])) {
518 if (empty($this->error)) {
519 $this->error = 'Validation failed for: ' . $addresses[$i];
520 }
521 return false;
522 }
523 }
524
525 // Nested format
526 if ($this->nestGroups) {
527 if ($is_group) {
528 $structure->addresses = $addresses;
529 } else {
530 $structure = $addresses[0];
531 }
532
533 // Flat format
534 } elseif ($is_group) {
535 $structure = array_merge($structure, $addresses);
536 } else {
537 $structure = $addresses;
538 }
539
540 return $structure;
541 }
542
549 protected function _validatePhrase(string $phrase): bool
550 {
551 // Splits on one or more Tab or space.
552 $parts = preg_split('/[ \\x09]+/', $phrase, -1, PREG_SPLIT_NO_EMPTY);
553
554 $phrase_parts = [];
555 while (count($parts) > 0) {
556 $phrase_parts[] = $this->_splitCheck($parts, ' ');
557 for ($i = 0; $i < $this->index + 1; $i++) {
558 array_shift($parts);
559 }
560 }
561
562 foreach ($phrase_parts as $part) {
563 // If quoted string:
564 if (strpos($part, '"') === 0) {
565 if (!$this->_validateQuotedString($part)) {
566 return false;
567 }
568 continue;
569 }
570
571 // Otherwise it's an atom:
572 if (!$this->_validateAtom($part)) {
573 return false;
574 }
575 }
576
577 return true;
578 }
579
592 protected function _validateAtom(string $atom): bool
593 {
594 if (!$this->validate) {
595 // Validation has been turned off; assume the atom is okay.
596 return true;
597 }
598
599 // Check for any char from ASCII 0 - ASCII 127
600 // mjansen patch 16 Sep 2015 start
601 // Check for specials:
602 if (preg_match('/[][()<>@,;\\:". ]/', $atom)) {
603 return false;
604 }
605
606 // Check for control characters (ASCII 0-31):
607 if (preg_match('/[\\x00-\\x1F]+/', $atom)) {
608 return false;
609 }
610 #16291
611 #17618
612 if (!(bool) preg_match('//u', $atom)) {
613 return false;
614 }
615 // mjansen patch 16 Sep 2015 end
616
617 return true;
618 }
619
627 protected function _validateQuotedString(string $qstring): bool
628 {
629 // Leading and trailing "
630 $qstring = substr($qstring, 1, -1);
631
632 // Perform check, removing quoted characters first.
633 return !preg_match('/[\x0D\\\\"]/', preg_replace('/\\\\./', '', $qstring));
634 }
635
644 public function validateMailbox(string &$mailbox): bool
645 {
646 // A couple of defaults.
647 $phrase = '';
648 $comment = '';
649 $comments = [];
650
651 // Catch any RFC822 comments and store them separately.
652 $_mailbox = $mailbox;
653 while (trim($_mailbox) !== '') {
654 $parts = explode('(', $_mailbox);
655 $before_comment = $this->_splitCheck($parts, '(');
656 if ($before_comment !== $_mailbox) {
657 // First char should be a (.
658 $comment = substr(str_replace($before_comment, '', $_mailbox), 1);
659 $parts = explode(')', $comment);
660 $comment = $this->_splitCheck($parts, ')');
662
663 // +2 is for the brackets
664 $_mailbox = substr($_mailbox, strpos($_mailbox, '(' . $comment) + strlen($comment) + 2);
665 } else {
666 break;
667 }
668 }
669
670 foreach ($comments as $comment) {
671 $mailbox = str_replace("($comment)", '', $mailbox);
672 }
673
674 $mailbox = trim($mailbox);
675
676 // Check for name + route-addr
677 if (substr($mailbox, -1) === '>' && $mailbox[0] !== '<') {
678 $parts = explode('<', $mailbox);
679 $name = $this->_splitCheck($parts, '<');
680
681 $phrase = trim($name);
682 $route_addr = trim(substr($mailbox, strlen($name . '<'), -1));
683
684 if ($this->_validatePhrase($phrase) === false ||
685 ($route_addr = $this->_validateRouteAddr($route_addr)) === false) {
686 return false;
687 }
688
689 // Only got addr-spec
690 } else {
691 // First snip angle brackets if present.
692 if ($mailbox[0] === '<' && substr($mailbox, -1) === '>') {
693 $addr_spec = substr($mailbox, 1, -1);
694 } else {
695 $addr_spec = $mailbox;
696 }
697
698 if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {
699 return false;
700 }
701 }
702
703 // Construct the object that will be returned.
704 $mbox = new stdClass();
705
706 // Add the phrase (even if empty) and comments
707 $mbox->personal = $phrase;
708 $mbox->comment = $comments ?? [];
709
710 if (isset($route_addr)) {
711 $mbox->mailbox = $route_addr['local_part'];
712 $mbox->host = $route_addr['domain'];
713 if ($route_addr['adl'] !== '') {
714 $mbox->adl = $route_addr['adl'];
715 }
716 } else {
717 $mbox->mailbox = $addr_spec['local_part'];
718 $mbox->host = $addr_spec['domain'];
719 }
720
721 $mailbox = $mbox;
722 return true;
723 }
724
735 protected function _validateRouteAddr(string $route_addr)
736 {
737 // Check for colon.
738 if (strpos($route_addr, ':') !== false) {
739 $parts = explode(':', $route_addr);
740 $route = $this->_splitCheck($parts, ':');
741 } else {
742 $route = $route_addr;
743 }
744
745 // If $route is same as $route_addr then the colon was in
746 // quotes or brackets or, of course, non existent.
747 if ($route === $route_addr) {
748 unset($route);
749 $addr_spec = $route_addr;
750 if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {
751 return false;
752 }
753 } else {
754 // Validate route part.
755 if (($route = $this->_validateRoute($route)) === false) {
756 return false;
757 }
758
759 $addr_spec = substr($route_addr, strlen($route . ':'));
760
761 // Validate addr-spec part.
762 if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {
763 return false;
764 }
765 }
766
767 if (isset($route)) {
768 $return['adl'] = $route;
769 } else {
770 $return['adl'] = '';
771 }
772
773 $return = array_merge($return, $addr_spec);
774 return $return;
775 }
776
784 protected function _validateRoute(string $route)
785 {
786 // Split on comma.
787 $domains = explode(',', trim($route));
788
789 foreach ($domains as $domain) {
790 $domain = str_replace('@', '', trim($domain));
791 if (!$this->_validateDomain($domain)) {
792 return false;
793 }
794 }
795
796 return $route;
797 }
798
808 protected function _validateDomain(string $domain)
809 {
810 // Note the different use of $subdomains and $sub_domains
811 $subdomains = explode('.', $domain);
812
813 $sub_domains = [];
814 while (count($subdomains) > 0) {
815 $sub_domains[] = $this->_splitCheck($subdomains, '.');
816 for ($i = 0; $i < $this->index + 1; $i++) {
817 array_shift($subdomains);
818 }
819 }
820
821 foreach ($sub_domains as $sub_domain) {
822 if (!$this->_validateSubdomain(trim($sub_domain))) {
823 return false;
824 }
825 }
826
827 // Managed to get here, so return input.
828 return $domain;
829 }
830
838 protected function _validateSubdomain(string $subdomain): bool
839 {
840 if (preg_match('|^\[(.*)]$|', $subdomain, $arr)) {
841 if (!$this->_validateDliteral($arr[1])) {
842 return false;
843 }
844 } elseif (!$this->_validateAtom($subdomain)) {
845 return false;
846 }
847
848 // Got here, so return successful.
849 return true;
850 }
851
859 protected function _validateDliteral(string $dliteral): bool
860 {
861 return !preg_match('/(.)[][\x0D\\\\]/', $dliteral, $matches) &&
862 ((!isset($matches[1])) || $matches[1] != '\\');
863 }
864
873 protected function _validateAddrSpec(string $addr_spec)
874 {
875 $addr_spec = trim($addr_spec);
876
877 // mjansen patch 16 Sep 2016 start
878 $validateState = $this->validate;
879 // mjansen patch 16 Sep 2016 end
880 // Split on @ sign if there is one.
881 if (strpos($addr_spec, '@') !== false) {
882 $parts = explode('@', $addr_spec);
883 $local_part = $this->_splitCheck($parts, '@');
884 $domain = substr($addr_spec, strlen($local_part . '@'));
885 // mjansen patch 16 Sep 2016 start
886 if (substr_count($addr_spec, '@') !== 1 && $local_part === '') {
887 $this->validate = false;
888 $local_part = $addr_spec;
889 $domain = $this->default_domain;
890 }
891 // mjansen patch 16 Sep 2016 end
892 // No @ sign so assume the default domain.
893 } else {
894 $local_part = $addr_spec;
895 $domain = $this->default_domain;
896 }
897
898 if (($local_part = $this->_validateLocalPart($local_part)) === false) {
899 return false;
900 }
901 // mjansen patch 16 Sep 2016 start
902 if ($validateState !== $this->validate) {
903 $this->validate = $validateState;
904 }
905 // mjansen patch 16 Sep 2016 end
906 if (($domain = $this->_validateDomain($domain)) === false) {
907 return false;
908 }
909
910 // Got here so return successful.
911 return ['local_part' => $local_part, 'domain' => $domain];
912 }
913
922 protected function _validateLocalPart(string $local_part)
923 {
924 $parts = explode('.', $local_part);
925 $words = [];
926
927 // Split the local_part into words.
928 while (count($parts) > 0) {
929 $words[] = $this->_splitCheck($parts, '.');
930 for ($i = 0; $i < $this->index + 1; $i++) {
931 array_shift($parts);
932 }
933 }
934
935 // Validate each word.
936 foreach ($words as $word) {
937 // iszmais patch 19 May 2020 start
938 // word cannot be empty (#17317)
939 //if ($word === '') {
940 // return false;
941 //}
942 // iszmais patch 19 May 2020 end
943 // If this word contains an unquoted space, it is invalid. (6.2.4)
944 if (strpos($word, ' ') && $word[0] !== '"') {
945 // mjansen patch 24 Feb 2016 start
946 // Mantis issue #18018
947 // # http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx/
948 //return false;
949 // mjansen patch 24 Feb 2016 end
950 }
951
952 if ($this->_validatePhrase(trim($word)) === false) {
953 return false;
954 }
955 }
956
957 // Managed to get here, so return the input.
958 return $local_part;
959 }
960
971 public function approximateCount(string $data): int
972 {
973 return count(preg_split('/(?<!\\\\),/', $data));
974 }
975
989 public function isValidInetAddress(string $data, bool $strict = false)
990 {
991 $regex =
992 $strict ?
993 '/^([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i' :
994 '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})$/i';
995 if (preg_match($regex, trim($data), $matches)) {
996 return [$matches[1], $matches[2]];
997 }
998
999 return false;
1000 }
1001}
$structure
TOTAL STRUCTURE.
$comment
Definition: buildRTE.php:72
_hasUnclosedBracketsSub(string $string, int &$num, string $char)
Sub function that is used only by hasUnclosedBrackets().
Definition: RFC822.php:446
bool $validate
Whether or not to validate atoms for non-ascii characters.
Definition: RFC822.php:98
string $error
The current error message, if any.
Definition: RFC822.php:116
_validateRouteAddr(string $route_addr)
This function validates a route-addr which is: route-addr = "<" [route] addr-spec ">".
Definition: RFC822.php:735
_splitCheck(array $parts, string $char)
A common function that will check an exploded string.
Definition: RFC822.php:354
_splitAddresses(string $address)
Splits an address into separate addresses.
Definition: RFC822.php:263
_validateAddress(array $address)
Function to begin checking the address.
Definition: RFC822.php:467
approximateCount(string $data)
Returns an approximate count of how many addresses are in the given string.
Definition: RFC822.php:971
_validateDliteral(string $dliteral)
Function to validate a domain literal: domain-literal = "[" *(dtext / quoted-pair) "]".
Definition: RFC822.php:859
int $index
An internal counter/pointer.
Definition: RFC822.php:122
_validateQuotedString(string $qstring)
Function to validate quoted string, which is: quoted-string = <"> *(qtext/quoted-pair) <">
Definition: RFC822.php:627
array $structure
The final array of parsed address information that we build up.
Definition: RFC822.php:110
string $default_domain
The default domain to use for unqualified addresses.
Definition: RFC822.php:86
_validatePhrase(string $phrase)
Function to validate a phrase.
Definition: RFC822.php:549
isValidInetAddress(string $data, bool $strict=false)
This is a email validating function separate to the rest of the class.
Definition: RFC822.php:989
_validateRoute(string $route)
Function to validate a route, which is: route = 1#("@" domain) ":".
Definition: RFC822.php:784
_validateDomain(string $domain)
Function to validate a domain, though this is not quite what you expect of a strict internet domain.
Definition: RFC822.php:808
__construct(?string $address=null, ?string $default_domain=null, ?bool $nest_groups=null, ?bool $validate=null, ?int $limit=null)
Sets up the object.
Definition: RFC822.php:154
_isGroup(string $address)
Checks for a group at the start of the string.
Definition: RFC822.php:330
int $num_groups
The number of groups that have been found in the address list.
Definition: RFC822.php:129
validateMailbox(string &$mailbox)
Function to validate a mailbox, which is: mailbox = addr-spec ; simple address / phrase route-addr ; ...
Definition: RFC822.php:644
_hasUnclosedBrackets(string $string, string $chars)
Checks if a string has an unclosed brackets or not.
Definition: RFC822.php:422
bool $mailRFC822
A variable so that we can tell whether or not we're inside a Mail_RFC822 object.
Definition: RFC822.php:136
parseAddressList(?string $address=null, ?string $default_domain=null, ?bool $nest_groups=null, ?bool $validate=null, ?int $limit=null)
Starts the whole process.
Definition: RFC822.php:189
array $addresses
The array of raw addresses built up as we parse.
Definition: RFC822.php:104
_validateAtom(string $atom)
Function to validate an atom which from rfc822 is: atom = 1*<any CHAR except specials,...
Definition: RFC822.php:592
_hasUnclosedQuotes(string $string)
Checks if a string has unclosed quotes or not.
Definition: RFC822.php:385
bool $nestGroups
Should we return a nested array showing groups, or flatten everything?
Definition: RFC822.php:92
string $address
The address being parsed by the RFC822 object.
Definition: RFC822.php:80
int $limit
A limit after which processing stops.
Definition: RFC822.php:142
_validateLocalPart(string $local_part)
Function to validate the local part of an address: local-part = word *("." word)
Definition: RFC822.php:922
_validateAddrSpec(string $addr_spec)
Function to validate an addr-spec.
Definition: RFC822.php:873
_validateSubdomain(string $subdomain)
Function to validate a subdomain: subdomain = domain-ref / domain-literal.
Definition: RFC822.php:838
error(string $a_errmsg)
$valid
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61
if(!file_exists('../ilias.ini.php'))
$comments