Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Gaussorgues <[email protected]>
  • Loading branch information
Altahrim committed Dec 4, 2024
1 parent a6b8609 commit d695288
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions core/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
use OCP\Security\Bruteforce\IThrottler;
use OCP\Security\ITrustedDomainHelper;
use OCP\Util;
use Psr\Log\LoggerInterface;

class LoginController extends Controller {
public const LOGIN_MSG_INVALIDPASSWORD = 'invalidpassword';
Expand Down Expand Up @@ -294,6 +295,7 @@ public function tryLogin(
$origin = $this->request->getHeader('Origin');
$throttle = true;
if ($origin === '' || !$trustedDomainHelper->isTrustedUrl($origin)) {
\OC::$server->get(LoggerInterface::class)->error('Origin ' . $origin . ' isnt trusted', ['trusted' => \OC::$server->get(IConfig::class)->getSystemValue('trusted_domains')]);
// Login attempt not from the same origin,
// We only allow this on the login flow but not on the UI login page.
// This could have come from someone malicious who tries to block a user by triggering the bruteforce protection.
Expand All @@ -308,6 +310,7 @@ public function tryLogin(
}
$error = self::LOGIN_MSG_CSRFCHECKFAILED;
}
\OC::$server->get(LoggerInterface::class)->error('Origin ' . $origin . ' is trusted!', ['trusted' => \OC::$server->get(IConfig::class)->getSystemValue('trusted_domains')]);

if ($error !== '') {
// Clear any auth remnants like cookies to ensure a clean login
Expand Down
2 changes: 1 addition & 1 deletion cypress/dockerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export const waitOnNextcloud = async function(ip: string) {
const runExec = async function(
container: Docker.Container,
command: string[],
verbose = false,
verbose = true,
user = 'www-data',
workdir?: string,
): Promise<string> {
Expand Down

0 comments on commit d695288

Please sign in to comment.