Skip to content

Add more #[\SensitiveParameter] #48274

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

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Conversation

fancyweb
Copy link
Contributor

Q A
Branch? 6.2
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

Follow-up to #46183

@@ -79,7 +79,7 @@ public function getToken(string $tokenId): CsrfToken
return new CsrfToken($tokenId, $this->randomize($value));
}

public function refreshToken(#[\SensitiveParameter] string $tokenId): CsrfToken
public function refreshToken(string $tokenId): CsrfToken
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GromNaN I think this one was a mistake. It was not added to the interface and all other CSRF token ids. WDYT?

@@ -28,7 +28,7 @@ public function getToken(string $tokenId): string;
/**
* Stores a CSRF token.
*/
public function setToken(string $tokenId, string $token);
public function setToken(string $tokenId, #[\SensitiveParameter] string $token);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

From #46183:

The attribute has no effect on the interface, but is a remainder for implementers.

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

Good catch.

@fabpot
Copy link
Member

fabpot commented Nov 22, 2022

Thank you @fancyweb.

@fabpot fabpot merged commit 2dc0670 into symfony:6.2 Nov 22, 2022
@fancyweb fancyweb deleted the more-sensitive-parameter branch November 22, 2022 08:10
@fabpot fabpot mentioned this pull request Nov 25, 2022
nicolas-grekas added a commit that referenced this pull request Jan 19, 2023
This PR was merged into the 6.3 branch.

Discussion
----------

Add #[\SensitiveParameter] to $sessionId

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Follow-up to #48274 and #46183

Commits
-------

32c9f28 Add #[\SensitiveParameter] to $sessionId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants