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

Prevent automated scanner as well as improving performance #339

Merged
merged 4 commits into from
Feb 25, 2020

Conversation

EdiWang
Copy link
Owner

@EdiWang EdiWang commented Feb 25, 2020

Address #338

@EdiWang EdiWang self-assigned this Feb 25, 2020
@Anduin2017
Copy link
Collaborator

While this is a nice fix, your regex expression is super hard to read. Why not copy it to a const var?

@EdiWang
Copy link
Owner Author

EdiWang commented Feb 25, 2020

@Anduin2017 good catch, I will work 996 and refact the code

@EdiWang
Copy link
Owner Author

EdiWang commented Feb 25, 2020

@Anduin2017

Consts is a no go, code will end up like this:

[Route("list/{categoryName:regex(" + WebConsts.ROUTE_REGEX_SLUG + ")}")]

And this won't compile:

[Route($"list/{{categoryName:regex({WebConsts.ROUTE_REGEX_SLUG})}}")]

@EdiWang EdiWang merged commit 083f92f into master Feb 25, 2020
@EdiWang EdiWang deleted the anti-boring-scanner branch February 25, 2020 11:24
@Anduin2017
Copy link
Collaborator

F**k C# compiler.

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