| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function isFailed(): bool |
||
| 22 | { |
||
| 23 | if (!isset($this->arguments['registration']['cr-response'])) { |
||
| 24 | return true; |
||
| 25 | } |
||
| 26 | |||
| 27 | $challenge = MiscUtility::getSpamCheckChallenge((int)$this->arguments['event']); |
||
| 28 | $originalChallenge = ($this->configuration['prefix'] ?? 'SfEventMgt') . |
||
| 29 | $challenge . ($this->configuration['postfix'] ?? 'TYPO3'); |
||
| 30 | |||
| 31 | $expectedResponse = str_rot13($originalChallenge); |
||
| 32 | $response = $this->arguments['registration']['cr-response'] ?? ''; |
||
| 33 | |||
| 34 | return $expectedResponse !== $response; |
||
| 35 | } |
||
| 37 |