Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/unpublish #2

Merged
merged 5 commits into from
Feb 22, 2024
Merged

Feature/unpublish #2

merged 5 commits into from
Feb 22, 2024

Conversation

mirche97
Copy link
Contributor

@mirche97 mirche97 commented Feb 6, 2024

No description provided.

Comment on lines 47 to 50
$csrfToken = $request->getHeader('X-CSRF-Token');
if (!SecurityToken::inst()->check($csrfToken)) {
return $this->httpError(400, 'CSRF token mismatch');
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the SecurityToken to direct check the request rather then unpack the token yourself.

if (!SecurityToken::inst()->checkRequest($request)) {
    return $this->httpError(400, 'CSRF token mismatch');
}

Comment on lines 86 to 87
return $response;
return $res;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double returns

@@ -0,0 +1,54 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File misses the .php extension.

src/URLTranslator.php Show resolved Hide resolved
@erikfrerejean erikfrerejean merged commit 36e9c0a into ss-5-wip Feb 22, 2024
@erikfrerejean erikfrerejean deleted the feature/unpublish branch February 22, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants