8000 Add port in access_control? · Issue #26071 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add port in access_control? #26071

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
roukmoute opened this issue Feb 7, 2018 · 0 comments
Closed

Add port in access_control? #26071

roukmoute opened this issue Feb 7, 2018 · 0 comments

Comments

@roukmoute
Copy link
Contributor
roukmoute commented Feb 7, 2018
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.3

Are you interested that I add a new P.R. to support port in access_control?
Currently if we would like to use access_control to redirect at, for example, localhost:8080, it is not possible.
So for improve this possibility I suggest to add a new key named port.

Because Request::getHost() only retrieve the host without port.

And this is what is used to compare at this place

if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getHost())) {

Or we could go even further by adding a new key named redirect_to and if all is respected, we could use the key redirect the user to the value of this key.

What do think of that?

@roukmoute roukmoute changed the title Add port in access_control Add port in access_control? Feb 9, 2018
@fabpot fabpot closed this as completed Oct 10, 2018
fabpot added a commit that referenced this issue Oct 10, 2018
This PR was squashed before being merged into the 4.2-dev branch (closes #28061).

Discussion
----------

[Security] add port in access_control

| Q             | A
| ------------- | ---
| Branch?       | master for features
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26071
| License       | MIT
| Doc PR        | symfony/symfony-docs#10359

Add port in access_control

__Please Squash this P.R.__

Commits
-------

6413dcb [Security] add port in access_control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0