mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-07 00:55:59 +00:00
Project read permission was not enforced via /jobCaseInsensitive/jobname path.
Added unit test. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23629 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
64cb39fe50
commit
79f22cd661
3 files changed
+23
-2
No files matched your search
@@ -1796,9 +1796,12 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
|
||||
* Used only for mapping jobs to URL in a case-insensitive fashion.
|
||||
*/
|
||||
public TopLevelItem getJobCaseInsensitive(String name) {
|
||||
String match = Functions.toEmailSafeString(name);
|
||||
for (Entry<String, TopLevelItem> e : items.entrySet()) {
|
||||
if(Functions.toEmailSafeString(e.getKey()).equalsIgnoreCase(Functions.toEmailSafeString(name)))
|
||||
return e.getValue();
|
||||
if(Functions.toEmailSafeString(e.getKey()).equalsIgnoreCase(match)) {
|
||||
TopLevelItem item = e.getValue();
|
||||
return item.hasPermission(Item.READ) ? item : null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user