-
Notifications
You must be signed in to change notification settings - Fork 6k
Add meaningful toString/getIpAddress methods to org.springframework.security.web.util.matcher.IpAddressMatcher #16693
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
Comments
I think a |
I'd like to contribute to this issue. Would that be possible? |
@transentia Do you just need a function inside IpAddressMatcher that returns the public requiredAddress? |
At the time I opened this, I was just focussed on the toString. I can definitely see the value of a getIpAddress method. also a getMask method, I guess. And thank you for taking this on. |
@jzheaux Would it be okay if I contributed to this issue? |
Add meaningful toString() to IpAddressMatcher.java Closes spring-projectsgh-16693 Signed-off-by: Christopher Thumberger <[email protected]>
@wtigerhyunsu jzheaux seems to rarely assigne issues. If it's something simple it's better to just do the issue and submit a PR than asking for assignment |
@christopher-thumberger-whizus it looks like @wtigerhyunsu was interested in contributing but you opened your own PR. It also looks like your PR doesn't quite match what was mentioned in this comment. For those reasons, I will assign this issue to @wtigerhyunsu so they can try their hand at opening a PR. |
Closes spring-projectsgh-16693 Signed-off-by: su <[email protected]>
Closing in favor of #16795 |
Expected Behavior
It should be possible to determine the address that IpAddressMatcher was instantiated with. Via a getter or via toString.
Current Behavior
The best/only thing that one can get is:
The class is final and cannot be overridden to supply these methods.
I guess this means that debugging would be a pain as well...
Looking at the code, it appears that the ipAddress parameter is not even retained after construction.
Context
I want to be able to read a list of matchers from an external config and then log the list once it has been created.
At the moment, I have to have use peek like this:
More cumbersome than I would like.
Less useful/informative than simply putting this after list creation:
The text was updated successfully, but these errors were encountered: