@@ -28,11 +28,11 @@ |
||
28 | 28 | * Null authentication mechanism |
29 | 29 | */ |
30 | 30 | class NullMechanism extends AuthMechanism { |
31 | - public function __construct(IL10N $l) { |
|
32 | - $this |
|
33 | - ->setIdentifier('null::null') |
|
34 | - ->setScheme(self::SCHEME_NULL) |
|
35 | - ->setText($l->t('None')) |
|
36 | - ; |
|
37 | - } |
|
31 | + public function __construct(IL10N $l) { |
|
32 | + $this |
|
33 | + ->setIdentifier('null::null') |
|
34 | + ->setScheme(self::SCHEME_NULL) |
|
35 | + ->setText($l->t('None')) |
|
36 | + ; |
|
37 | + } |
|
38 | 38 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | $notification |
91 | 91 | ->setApp('comments') |
92 | 92 | ->setObject('comment', $comment->getId()) |
93 | - ->setSubject('mention', [ $comment->getObjectType(), $comment->getObjectId() ]) |
|
93 | + ->setSubject('mention', [$comment->getObjectType(), $comment->getObjectId()]) |
|
94 | 94 | ->setDateTime($comment->getCreationDateTime()); |
95 | 95 | |
96 | 96 | return $notification; |
@@ -14,71 +14,71 @@ |
||
14 | 14 | use OCP\Notification\INotification; |
15 | 15 | |
16 | 16 | class Listener { |
17 | - public function __construct( |
|
18 | - protected IManager $notificationManager, |
|
19 | - protected IUserManager $userManager, |
|
20 | - ) { |
|
21 | - } |
|
17 | + public function __construct( |
|
18 | + protected IManager $notificationManager, |
|
19 | + protected IUserManager $userManager, |
|
20 | + ) { |
|
21 | + } |
|
22 | 22 | |
23 | - public function evaluate(CommentsEvent $event): void { |
|
24 | - $comment = $event->getComment(); |
|
23 | + public function evaluate(CommentsEvent $event): void { |
|
24 | + $comment = $event->getComment(); |
|
25 | 25 | |
26 | - $mentions = $this->extractMentions($comment->getMentions()); |
|
27 | - if (empty($mentions)) { |
|
28 | - // no one to notify |
|
29 | - return; |
|
30 | - } |
|
26 | + $mentions = $this->extractMentions($comment->getMentions()); |
|
27 | + if (empty($mentions)) { |
|
28 | + // no one to notify |
|
29 | + return; |
|
30 | + } |
|
31 | 31 | |
32 | - $notification = $this->instantiateNotification($comment); |
|
32 | + $notification = $this->instantiateNotification($comment); |
|
33 | 33 | |
34 | - foreach ($mentions as $uid) { |
|
35 | - if (($comment->getActorType() === 'users' && $uid === $comment->getActorId()) |
|
36 | - || !$this->userManager->userExists($uid) |
|
37 | - ) { |
|
38 | - // do not notify unknown users or yourself |
|
39 | - continue; |
|
40 | - } |
|
34 | + foreach ($mentions as $uid) { |
|
35 | + if (($comment->getActorType() === 'users' && $uid === $comment->getActorId()) |
|
36 | + || !$this->userManager->userExists($uid) |
|
37 | + ) { |
|
38 | + // do not notify unknown users or yourself |
|
39 | + continue; |
|
40 | + } |
|
41 | 41 | |
42 | - $notification->setUser($uid); |
|
43 | - if ($event->getEvent() === CommentsEvent::EVENT_DELETE |
|
44 | - || $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE) { |
|
45 | - $this->notificationManager->markProcessed($notification); |
|
46 | - } else { |
|
47 | - $this->notificationManager->notify($notification); |
|
48 | - } |
|
49 | - } |
|
50 | - } |
|
42 | + $notification->setUser($uid); |
|
43 | + if ($event->getEvent() === CommentsEvent::EVENT_DELETE |
|
44 | + || $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE) { |
|
45 | + $this->notificationManager->markProcessed($notification); |
|
46 | + } else { |
|
47 | + $this->notificationManager->notify($notification); |
|
48 | + } |
|
49 | + } |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * Creates a notification instance and fills it with comment data |
|
54 | - */ |
|
55 | - public function instantiateNotification(IComment $comment): INotification { |
|
56 | - $notification = $this->notificationManager->createNotification(); |
|
57 | - $notification |
|
58 | - ->setApp('comments') |
|
59 | - ->setObject('comment', $comment->getId()) |
|
60 | - ->setSubject('mention', [ $comment->getObjectType(), $comment->getObjectId() ]) |
|
61 | - ->setDateTime($comment->getCreationDateTime()); |
|
52 | + /** |
|
53 | + * Creates a notification instance and fills it with comment data |
|
54 | + */ |
|
55 | + public function instantiateNotification(IComment $comment): INotification { |
|
56 | + $notification = $this->notificationManager->createNotification(); |
|
57 | + $notification |
|
58 | + ->setApp('comments') |
|
59 | + ->setObject('comment', $comment->getId()) |
|
60 | + ->setSubject('mention', [ $comment->getObjectType(), $comment->getObjectId() ]) |
|
61 | + ->setDateTime($comment->getCreationDateTime()); |
|
62 | 62 | |
63 | - return $notification; |
|
64 | - } |
|
63 | + return $notification; |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * Flattens the mention array returned from comments to a list of user ids. |
|
68 | - * |
|
69 | - * @param array $mentions |
|
70 | - * @return list<string> containing the mentions, e.g. ['alice', 'bob'] |
|
71 | - */ |
|
72 | - public function extractMentions(array $mentions): array { |
|
73 | - if (empty($mentions)) { |
|
74 | - return []; |
|
75 | - } |
|
76 | - $uids = []; |
|
77 | - foreach ($mentions as $mention) { |
|
78 | - if ($mention['type'] === 'user') { |
|
79 | - $uids[] = $mention['id']; |
|
80 | - } |
|
81 | - } |
|
82 | - return $uids; |
|
83 | - } |
|
66 | + /** |
|
67 | + * Flattens the mention array returned from comments to a list of user ids. |
|
68 | + * |
|
69 | + * @param array $mentions |
|
70 | + * @return list<string> containing the mentions, e.g. ['alice', 'bob'] |
|
71 | + */ |
|
72 | + public function extractMentions(array $mentions): array { |
|
73 | + if (empty($mentions)) { |
|
74 | + return []; |
|
75 | + } |
|
76 | + $uids = []; |
|
77 | + foreach ($mentions as $mention) { |
|
78 | + if ($mention['type'] === 'user') { |
|
79 | + $uids[] = $mention['id']; |
|
80 | + } |
|
81 | + } |
|
82 | + return $uids; |
|
83 | + } |
|
84 | 84 | } |
@@ -69,10 +69,10 @@ |
||
69 | 69 | return $this->url; |
70 | 70 | } |
71 | 71 | |
72 | - $this->url = $this->request->getServerProtocol() . '://';// E.g. http(s) + :// |
|
73 | - $this->url .= $this->request->getServerHost();// E.g. localhost |
|
74 | - $this->url .= $this->request->getScriptName();// E.g. /nextcloud/index.php |
|
75 | - $this->url .= $this->request->getPathInfo();// E.g. /apps/files_texteditor/ajax/loadfile |
|
72 | + $this->url = $this->request->getServerProtocol().'://'; // E.g. http(s) + :// |
|
73 | + $this->url .= $this->request->getServerHost(); // E.g. localhost |
|
74 | + $this->url .= $this->request->getScriptName(); // E.g. /nextcloud/index.php |
|
75 | + $this->url .= $this->request->getPathInfo(); // E.g. /apps/files_texteditor/ajax/loadfile |
|
76 | 76 | |
77 | 77 | return $this->url; // E.g. https://localhost/nextcloud/index.php/apps/files_texteditor/ajax/loadfile |
78 | 78 | } |
@@ -10,71 +10,71 @@ |
||
10 | 10 | use OCP\IRequest; |
11 | 11 | |
12 | 12 | class RequestURL extends AbstractStringCheck { |
13 | - public const CLI = 'cli'; |
|
13 | + public const CLI = 'cli'; |
|
14 | 14 | |
15 | - /** @var ?string */ |
|
16 | - protected $url; |
|
15 | + /** @var ?string */ |
|
16 | + protected $url; |
|
17 | 17 | |
18 | - /** |
|
19 | - * @param IL10N $l |
|
20 | - * @param IRequest $request |
|
21 | - */ |
|
22 | - public function __construct( |
|
23 | - IL10N $l, |
|
24 | - protected IRequest $request, |
|
25 | - ) { |
|
26 | - parent::__construct($l); |
|
27 | - } |
|
18 | + /** |
|
19 | + * @param IL10N $l |
|
20 | + * @param IRequest $request |
|
21 | + */ |
|
22 | + public function __construct( |
|
23 | + IL10N $l, |
|
24 | + protected IRequest $request, |
|
25 | + ) { |
|
26 | + parent::__construct($l); |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * @param string $operator |
|
31 | - * @param string $value |
|
32 | - * @return bool |
|
33 | - */ |
|
34 | - public function executeCheck($operator, $value) { |
|
35 | - if (\OC::$CLI) { |
|
36 | - $actualValue = $this->url = RequestURL::CLI; |
|
37 | - } else { |
|
38 | - $actualValue = $this->getActualValue(); |
|
39 | - } |
|
40 | - if (in_array($operator, ['is', '!is'])) { |
|
41 | - switch ($value) { |
|
42 | - case 'webdav': |
|
43 | - if ($operator === 'is') { |
|
44 | - return $this->isWebDAVRequest(); |
|
45 | - } else { |
|
46 | - return !$this->isWebDAVRequest(); |
|
47 | - } |
|
48 | - } |
|
49 | - } |
|
50 | - return $this->executeStringCheck($operator, $value, $actualValue); |
|
51 | - } |
|
29 | + /** |
|
30 | + * @param string $operator |
|
31 | + * @param string $value |
|
32 | + * @return bool |
|
33 | + */ |
|
34 | + public function executeCheck($operator, $value) { |
|
35 | + if (\OC::$CLI) { |
|
36 | + $actualValue = $this->url = RequestURL::CLI; |
|
37 | + } else { |
|
38 | + $actualValue = $this->getActualValue(); |
|
39 | + } |
|
40 | + if (in_array($operator, ['is', '!is'])) { |
|
41 | + switch ($value) { |
|
42 | + case 'webdav': |
|
43 | + if ($operator === 'is') { |
|
44 | + return $this->isWebDAVRequest(); |
|
45 | + } else { |
|
46 | + return !$this->isWebDAVRequest(); |
|
47 | + } |
|
48 | + } |
|
49 | + } |
|
50 | + return $this->executeStringCheck($operator, $value, $actualValue); |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @return string |
|
55 | - */ |
|
56 | - protected function getActualValue() { |
|
57 | - if ($this->url !== null) { |
|
58 | - return $this->url; |
|
59 | - } |
|
53 | + /** |
|
54 | + * @return string |
|
55 | + */ |
|
56 | + protected function getActualValue() { |
|
57 | + if ($this->url !== null) { |
|
58 | + return $this->url; |
|
59 | + } |
|
60 | 60 | |
61 | - $this->url = $this->request->getServerProtocol() . '://';// E.g. http(s) + :// |
|
62 | - $this->url .= $this->request->getServerHost();// E.g. localhost |
|
63 | - $this->url .= $this->request->getScriptName();// E.g. /nextcloud/index.php |
|
64 | - $this->url .= $this->request->getPathInfo();// E.g. /apps/files_texteditor/ajax/loadfile |
|
61 | + $this->url = $this->request->getServerProtocol() . '://';// E.g. http(s) + :// |
|
62 | + $this->url .= $this->request->getServerHost();// E.g. localhost |
|
63 | + $this->url .= $this->request->getScriptName();// E.g. /nextcloud/index.php |
|
64 | + $this->url .= $this->request->getPathInfo();// E.g. /apps/files_texteditor/ajax/loadfile |
|
65 | 65 | |
66 | - return $this->url; // E.g. https://localhost/nextcloud/index.php/apps/files_texteditor/ajax/loadfile |
|
67 | - } |
|
66 | + return $this->url; // E.g. https://localhost/nextcloud/index.php/apps/files_texteditor/ajax/loadfile |
|
67 | + } |
|
68 | 68 | |
69 | - protected function isWebDAVRequest(): bool { |
|
70 | - if ($this->url === RequestURL::CLI) { |
|
71 | - return false; |
|
72 | - } |
|
73 | - return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && ( |
|
74 | - $this->request->getPathInfo() === '/webdav' |
|
75 | - || str_starts_with($this->request->getPathInfo() ?? '', '/webdav/') |
|
76 | - || $this->request->getPathInfo() === '/dav/files' |
|
77 | - || str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/') |
|
78 | - ); |
|
79 | - } |
|
69 | + protected function isWebDAVRequest(): bool { |
|
70 | + if ($this->url === RequestURL::CLI) { |
|
71 | + return false; |
|
72 | + } |
|
73 | + return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && ( |
|
74 | + $this->request->getPathInfo() === '/webdav' |
|
75 | + || str_starts_with($this->request->getPathInfo() ?? '', '/webdav/') |
|
76 | + || $this->request->getPathInfo() === '/dav/files' |
|
77 | + || str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/') |
|
78 | + ); |
|
79 | + } |
|
80 | 80 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $this->checker->writeCoreSignature($x509, $rsa, $path); |
100 | 100 | $output->writeln('Successfully signed "core"'); |
101 | 101 | } catch (\Exception $e) { |
102 | - $output->writeln('Error: ' . $e->getMessage()); |
|
102 | + $output->writeln('Error: '.$e->getMessage()); |
|
103 | 103 | return 1; |
104 | 104 | } |
105 | 105 | return 0; |
@@ -22,60 +22,60 @@ |
||
22 | 22 | * @package OC\Core\Command\Integrity |
23 | 23 | */ |
24 | 24 | class SignCore extends Command { |
25 | - public function __construct( |
|
26 | - private Checker $checker, |
|
27 | - private FileAccessHelper $fileAccessHelper, |
|
28 | - ) { |
|
29 | - parent::__construct(null); |
|
30 | - } |
|
25 | + public function __construct( |
|
26 | + private Checker $checker, |
|
27 | + private FileAccessHelper $fileAccessHelper, |
|
28 | + ) { |
|
29 | + parent::__construct(null); |
|
30 | + } |
|
31 | 31 | |
32 | - protected function configure() { |
|
33 | - $this |
|
34 | - ->setName('integrity:sign-core') |
|
35 | - ->setDescription('Sign core using a private key.') |
|
36 | - ->addOption('privateKey', null, InputOption::VALUE_REQUIRED, 'Path to private key to use for signing') |
|
37 | - ->addOption('certificate', null, InputOption::VALUE_REQUIRED, 'Path to certificate to use for signing') |
|
38 | - ->addOption('path', null, InputOption::VALUE_REQUIRED, 'Path of core to sign'); |
|
39 | - } |
|
32 | + protected function configure() { |
|
33 | + $this |
|
34 | + ->setName('integrity:sign-core') |
|
35 | + ->setDescription('Sign core using a private key.') |
|
36 | + ->addOption('privateKey', null, InputOption::VALUE_REQUIRED, 'Path to private key to use for signing') |
|
37 | + ->addOption('certificate', null, InputOption::VALUE_REQUIRED, 'Path to certificate to use for signing') |
|
38 | + ->addOption('path', null, InputOption::VALUE_REQUIRED, 'Path of core to sign'); |
|
39 | + } |
|
40 | 40 | |
41 | - /** |
|
42 | - * {@inheritdoc } |
|
43 | - */ |
|
44 | - protected function execute(InputInterface $input, OutputInterface $output): int { |
|
45 | - $privateKeyPath = $input->getOption('privateKey'); |
|
46 | - $keyBundlePath = $input->getOption('certificate'); |
|
47 | - $path = $input->getOption('path'); |
|
48 | - if (is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) { |
|
49 | - $output->writeln('--privateKey, --certificate and --path are required.'); |
|
50 | - return 1; |
|
51 | - } |
|
41 | + /** |
|
42 | + * {@inheritdoc } |
|
43 | + */ |
|
44 | + protected function execute(InputInterface $input, OutputInterface $output): int { |
|
45 | + $privateKeyPath = $input->getOption('privateKey'); |
|
46 | + $keyBundlePath = $input->getOption('certificate'); |
|
47 | + $path = $input->getOption('path'); |
|
48 | + if (is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) { |
|
49 | + $output->writeln('--privateKey, --certificate and --path are required.'); |
|
50 | + return 1; |
|
51 | + } |
|
52 | 52 | |
53 | - $privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath); |
|
54 | - $keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath); |
|
53 | + $privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath); |
|
54 | + $keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath); |
|
55 | 55 | |
56 | - if ($privateKey === false) { |
|
57 | - $output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath)); |
|
58 | - return 1; |
|
59 | - } |
|
56 | + if ($privateKey === false) { |
|
57 | + $output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath)); |
|
58 | + return 1; |
|
59 | + } |
|
60 | 60 | |
61 | - if ($keyBundle === false) { |
|
62 | - $output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath)); |
|
63 | - return 1; |
|
64 | - } |
|
61 | + if ($keyBundle === false) { |
|
62 | + $output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath)); |
|
63 | + return 1; |
|
64 | + } |
|
65 | 65 | |
66 | - $rsa = new RSA(); |
|
67 | - $rsa->loadKey($privateKey); |
|
68 | - $x509 = new X509(); |
|
69 | - $x509->loadX509($keyBundle); |
|
70 | - $x509->setPrivateKey($rsa); |
|
66 | + $rsa = new RSA(); |
|
67 | + $rsa->loadKey($privateKey); |
|
68 | + $x509 = new X509(); |
|
69 | + $x509->loadX509($keyBundle); |
|
70 | + $x509->setPrivateKey($rsa); |
|
71 | 71 | |
72 | - try { |
|
73 | - $this->checker->writeCoreSignature($x509, $rsa, $path); |
|
74 | - $output->writeln('Successfully signed "core"'); |
|
75 | - } catch (\Exception $e) { |
|
76 | - $output->writeln('Error: ' . $e->getMessage()); |
|
77 | - return 1; |
|
78 | - } |
|
79 | - return 0; |
|
80 | - } |
|
72 | + try { |
|
73 | + $this->checker->writeCoreSignature($x509, $rsa, $path); |
|
74 | + $output->writeln('Successfully signed "core"'); |
|
75 | + } catch (\Exception $e) { |
|
76 | + $output->writeln('Error: ' . $e->getMessage()); |
|
77 | + return 1; |
|
78 | + } |
|
79 | + return 0; |
|
80 | + } |
|
81 | 81 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | */ |
52 | 52 | public function completeArgumentValues($argumentName, CompletionContext $context) { |
53 | 53 | if ($argumentName === 'uid') { |
54 | - return array_map(function (IUser $user) { |
|
54 | + return array_map(function(IUser $user) { |
|
55 | 55 | return $user->getUID(); |
56 | 56 | }, $this->userManager->search($context->getCurrentWord(), 100)); |
57 | 57 | } |
@@ -10,37 +10,37 @@ |
||
10 | 10 | use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; |
11 | 11 | |
12 | 12 | class Base extends \OC\Core\Command\Base { |
13 | - public function __construct( |
|
14 | - ?string $name, |
|
15 | - protected IUserManager $userManager, |
|
16 | - ) { |
|
17 | - parent::__construct($name); |
|
18 | - } |
|
13 | + public function __construct( |
|
14 | + ?string $name, |
|
15 | + protected IUserManager $userManager, |
|
16 | + ) { |
|
17 | + parent::__construct($name); |
|
18 | + } |
|
19 | 19 | |
20 | - /** |
|
21 | - * Return possible values for the named option |
|
22 | - * |
|
23 | - * @param string $optionName |
|
24 | - * @param CompletionContext $context |
|
25 | - * @return string[] |
|
26 | - */ |
|
27 | - public function completeOptionValues($optionName, CompletionContext $context) { |
|
28 | - return []; |
|
29 | - } |
|
20 | + /** |
|
21 | + * Return possible values for the named option |
|
22 | + * |
|
23 | + * @param string $optionName |
|
24 | + * @param CompletionContext $context |
|
25 | + * @return string[] |
|
26 | + */ |
|
27 | + public function completeOptionValues($optionName, CompletionContext $context) { |
|
28 | + return []; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * Return possible values for the named argument |
|
33 | - * |
|
34 | - * @param string $argumentName |
|
35 | - * @param CompletionContext $context |
|
36 | - * @return string[] |
|
37 | - */ |
|
38 | - public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
39 | - if ($argumentName === 'uid') { |
|
40 | - return array_map(function (IUser $user) { |
|
41 | - return $user->getUID(); |
|
42 | - }, $this->userManager->search($context->getCurrentWord(), 100)); |
|
43 | - } |
|
44 | - return []; |
|
45 | - } |
|
31 | + /** |
|
32 | + * Return possible values for the named argument |
|
33 | + * |
|
34 | + * @param string $argumentName |
|
35 | + * @param CompletionContext $context |
|
36 | + * @return string[] |
|
37 | + */ |
|
38 | + public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
39 | + if ($argumentName === 'uid') { |
|
40 | + return array_map(function (IUser $user) { |
|
41 | + return $user->getUID(); |
|
42 | + }, $this->userManager->search($context->getCurrentWord(), 100)); |
|
43 | + } |
|
44 | + return []; |
|
45 | + } |
|
46 | 46 | } |
@@ -16,8 +16,11 @@ |
||
16 | 16 | <?php if ($error): ?> |
17 | 17 | <?php if ($error_message): ?> |
18 | 18 | <p><strong><?php p($error_message); ?></strong></p> |
19 | - <?php else: ?> |
|
20 | - <p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p> |
|
19 | + <?php else { |
|
20 | + : ?> |
|
21 | + <p><strong><?php p($l->t('Error while validating your second factor')); |
|
22 | +} |
|
23 | +?></strong></p> |
|
21 | 24 | <?php endif; ?> |
22 | 25 | <?php endif; ?> |
23 | 26 | <?php print_unescaped($template); ?> |
@@ -29,11 +29,11 @@ |
||
29 | 29 | <?php if (!is_null($_['backupProvider'])): ?> |
30 | 30 | <p> |
31 | 31 | <a class="two-factor-secondary" href="<?php p(\OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.TwoFactorChallenge.showChallenge', |
32 | - [ |
|
33 | - 'challengeProviderId' => $_['backupProvider']->getId(), |
|
34 | - 'redirect_url' => $_['redirect_url'], |
|
35 | - ] |
|
36 | - )) ?>"> |
|
32 | + [ |
|
33 | + 'challengeProviderId' => $_['backupProvider']->getId(), |
|
34 | + 'redirect_url' => $_['redirect_url'], |
|
35 | + ] |
|
36 | + )) ?>"> |
|
37 | 37 | <?php p($l->t('Use backup code')) ?> |
38 | 38 | </a> |
39 | 39 | </p> |
@@ -27,18 +27,18 @@ |
||
27 | 27 | */ |
28 | 28 | class InvalidAuth extends AuthMechanism { |
29 | 29 | |
30 | - /** |
|
31 | - * Constructs a new InvalidAuth with the id of the invalid auth |
|
32 | - * for display purposes |
|
33 | - * |
|
34 | - * @param string $invalidId invalid id |
|
35 | - */ |
|
36 | - public function __construct($invalidId) { |
|
37 | - $this |
|
38 | - ->setIdentifier($invalidId) |
|
39 | - ->setScheme(self::SCHEME_NULL) |
|
40 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
41 | - ; |
|
42 | - } |
|
30 | + /** |
|
31 | + * Constructs a new InvalidAuth with the id of the invalid auth |
|
32 | + * for display purposes |
|
33 | + * |
|
34 | + * @param string $invalidId invalid id |
|
35 | + */ |
|
36 | + public function __construct($invalidId) { |
|
37 | + $this |
|
38 | + ->setIdentifier($invalidId) |
|
39 | + ->setScheme(self::SCHEME_NULL) |
|
40 | + ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
41 | + ; |
|
42 | + } |
|
43 | 43 | |
44 | 44 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $this |
39 | 39 | ->setIdentifier($invalidId) |
40 | 40 | ->setScheme(self::SCHEME_NULL) |
41 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
41 | + ->setText('Unknown auth mechanism backend '.$invalidId) |
|
42 | 42 | ; |
43 | 43 | } |
44 | 44 | } |
@@ -30,13 +30,13 @@ |
||
30 | 30 | * @since 13.0.0 |
31 | 31 | */ |
32 | 32 | interface ISearchPlugin { |
33 | - /** |
|
34 | - * @param string $search |
|
35 | - * @param int $limit |
|
36 | - * @param int $offset |
|
37 | - * @param ISearchResult $searchResult |
|
38 | - * @return bool whether the plugin has more results |
|
39 | - * @since 13.0.0 |
|
40 | - */ |
|
41 | - public function search($search, $limit, $offset, ISearchResult $searchResult); |
|
33 | + /** |
|
34 | + * @param string $search |
|
35 | + * @param int $limit |
|
36 | + * @param int $offset |
|
37 | + * @param ISearchResult $searchResult |
|
38 | + * @return bool whether the plugin has more results |
|
39 | + * @since 13.0.0 |
|
40 | + */ |
|
41 | + public function search($search, $limit, $offset, ISearchResult $searchResult); |
|
42 | 42 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * @package OC\AppFramework\Middleware\Security\Exceptions |
33 | 33 | */ |
34 | 34 | class LaxSameSiteCookieFailedException extends SecurityException { |
35 | - public function __construct() { |
|
36 | - parent::__construct('Lax Same Site Cookie is invalid in request.', Http::STATUS_PRECONDITION_FAILED); |
|
37 | - } |
|
35 | + public function __construct() { |
|
36 | + parent::__construct('Lax Same Site Cookie is invalid in request.', Http::STATUS_PRECONDITION_FAILED); |
|
37 | + } |
|
38 | 38 | } |