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

Fix invalid condition in toEmailSafeString #4162

Merged
merged 1 commit into from Aug 25, 2019

Conversation

Egor18
Copy link
Contributor

@Egor18 Egor18 commented Aug 21, 2019

Condition 'z'<=ch && ch<='Z' is always false. See http://www.asciitable.com/

@oleg-nenashev oleg-nenashev added the bug For changelog: Minor bug. Will be listed after features label Aug 22, 2019
@oleg-nenashev
Copy link
Member

@Egor18 is it a defect which impacts your instance? If so, could you please raise a JIRA ticket?

@oleg-nenashev oleg-nenashev added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Aug 22, 2019
@oleg-nenashev
Copy link
Member

Will merge tomorrow if no negative feedback

Copy link
Contributor

@Wadeck Wadeck left a comment

Choose a reason for hiding this comment

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

which impacts your instance?

@oleg-nenashev I do not want to reply in place of @Egor18 but he's using a tool to detect those flows.

This one is particularly interesting because it's only used in the core.
The method is Hudson#getJobCaseInsensitive which try to find project name A that is similar to B. Before doing the comparison, it applies the method toEmailSafeString on both sides and then compare. Meaning it's "just" too lenient and will not hide positive result, just display potentially some "negative" results. Correcting the behavior will provide more accurate results.

I looked at the plugin ecosystem, nobody is using that public static method (search in GH and local checkout plugins)

Anyway, thank you very much for your interest in the project @Egor18 it's really appreciated 👍

@Egor18
Copy link
Contributor Author

Egor18 commented Aug 22, 2019

Yeah, I found this while testing my data-flow analyzer on your source code, so I thought it would be nice to report some bugs :)
So this defect did not affect me directly.

@oleg-nenashev
Copy link
Member

Retriggering CI

@oleg-nenashev oleg-nenashev reopened this Aug 23, 2019
@oleg-nenashev oleg-nenashev merged commit e99ed77 into jenkinsci:master Aug 25, 2019
@oleg-nenashev
Copy link
Member

Thanks for your contribution @Egor18 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
6 participants