|
@@ 619-632 (lines=14) @@
|
| 616 |
|
* |
| 617 |
|
* @return string |
| 618 |
|
*/ |
| 619 |
|
private function validateAndSanitizeSignedService($signedService) |
| 620 |
|
{ |
| 621 |
|
// validate signed service is not null or empty |
| 622 |
|
Validate::isString($signedService, 'signedService'); |
| 623 |
|
Validate::notNullOrEmpty($signedService, 'signedService'); |
| 624 |
|
|
| 625 |
|
// The signed service should only be a combination of the letters b(lob) q(ueue) t(able) or f(ile) |
| 626 |
|
$validServices = ['b', 'q', 't', 'f']; |
| 627 |
|
|
| 628 |
|
return $this->validateAndSanitizeStringWithArray( |
| 629 |
|
strtolower($signedService), |
| 630 |
|
$validServices |
| 631 |
|
); |
| 632 |
|
} |
| 633 |
|
|
| 634 |
|
/** |
| 635 |
|
* Validates and sanitizes the signed resource type parameter |
|
@@ 643-656 (lines=14) @@
|
| 640 |
|
* |
| 641 |
|
* @return string |
| 642 |
|
*/ |
| 643 |
|
private function validateAndSanitizeSignedResourceType($signedResourceType) |
| 644 |
|
{ |
| 645 |
|
// validate signed resource type is not null or empty |
| 646 |
|
Validate::isString($signedResourceType, 'signedResourceType'); |
| 647 |
|
Validate::notNullOrEmpty($signedResourceType, 'signedResourceType'); |
| 648 |
|
|
| 649 |
|
// The signed resource type should only be a combination of the letters s(ervice) c(container) or o(bject) |
| 650 |
|
$validResourceTypes = ['s', 'c', 'o']; |
| 651 |
|
|
| 652 |
|
return $this->validateAndSanitizeStringWithArray( |
| 653 |
|
strtolower($signedResourceType), |
| 654 |
|
$validResourceTypes |
| 655 |
|
); |
| 656 |
|
} |
| 657 |
|
|
| 658 |
|
/** |
| 659 |
|
* Validates and sanitizes the signed permissions parameter |