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