Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role. #8997

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

Closed

Conversation

pawaclawczyk
Copy link
Contributor

Q A
Bug fix? yes
New feature no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #3085, #8974
License MIT
Doc PR n/a

Problem occurs while user is impersonated. Authentication process generates new token and doeas not preserve role ROLE_PREVIOUS_ADMIN. Ex. when parameter security.always_authenticate_before_granting is enabled.

@stof
Copy link
Member

stof commented Sep 12, 2013

@schmittjoh could you review this one ?

@pamil
Copy link
Contributor

pamil commented Nov 6, 2013

ping?

@jessem
Copy link

jessem commented Nov 14, 2013

Would be great to have this merged...

@@ -107,6 +108,29 @@ public function supports(TokenInterface $token)
}

/**
* Retrives roles from user and appends SwitchUserRole if original token contained one.
*
* @param \Symfony\Component\Security\Core\User\UserInterface $user
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the backslashes

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, add a use statement for this interface and simply do @param UserInterface $user here.

@pawaclawczyk
Copy link
Contributor Author

Ok, phpdocs fixed nad methd visibility changed to provate.

@craue
Copy link
Contributor

craue commented Dec 15, 2013

👍

fabpot added a commit that referenced this pull request Dec 29, 2013
…le. (pawaclawczyk)

This PR was squashed before being merged into the 2.3 branch (closes #8997).

Discussion
----------

[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.

<table>
  <tr>
    <td><b>Q</b></td>
    <td><b>A</b></td>
  </tr>
  <tr>
    <td>Bug fix?</td>
    <td>yes</td>
  </tr>
  <tr>
    <td>New feature</td>
    <td>no</td>
  </tr>
  <tr>
    <td>BC breaks?</td>
    <td>no</td>
  </tr>
  <tr>
    <td>Deprecations?</td>
    <td>no</td>
  </tr>
  <tr>
    <td>Tests pass?</td>
    <td>yes</td>
  </tr>
  <tr>
    <td>Fixed tickets</td>
    <td>#3085, #8974</td>
  </tr>
  <tr>
    <td>License</td>
    <td>MIT</td>
  </tr>
  <tr>
    <td>Doc PR</td>
    <td>n/a</td>
  </tr>
</table>

Problem occurs while user is impersonated. Authentication process generates new token and doeas not preserve role ```ROLE_PREVIOUS_ADMIN```. Ex. when parameter ```security.always_authenticate_before_granting``` is enabled.

Commits
-------

a7baa3b [Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
@fabpot fabpot closed this Dec 29, 2013
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.

8 participants