Commit Graph
1277 Commits
Author SHA1 Message Date
Kohsuke Kawaguchi 101b4e7fd5 [SECURITY-144] Classify all the core callables one way or the other 2014-09-18 15:07:31 -07:00
Kohsuke Kawaguchi 54d44502bd [FIXED SECURITY-127]
CONFIGURE permission shouldn't allow the type of the job to be changed.
That's more of CREATE+DELETE.

In any case, the code doesn't correctly handling submitting config.xml
for a different type.
2014-09-02 16:12:47 -07:00
Kohsuke Kawaguchi db757116f1 [FIXED SECURITY-128]
It may be that the 'newName' exists and just not visible to the user trying to do a rename
2014-09-02 14:05:42 -07:00
Kohsuke Kawaguchi b1803a9539 [FIXED SECURITY-110]
Don't let UsernameNotFoundException vs BadCredentialsException
difference to be seen by the caller, for that tells whether the user
exists or not.

But to assist trouble-shooting, do report that error to the server. UUID
helps the user finds the information in the log file
2014-08-29 18:02:02 -07:00
Jesse Glick f0a29b562e [FIXED SECURITY-155] Do not allow plugin code to be downloaded via doDynamic, only static resources. 2014-08-22 16:41:19 -04:00
Jesse Glick 71a28615e3 [FIXED SECURITY-131] Recode restOfPath before constructing URLs from it, so it cannot be used for directory traversal. 2014-08-20 19:08:20 -04:00
Jesse Glick 1239ed3bd9 Merge commit '16f2c7af0122a4f3cfd709bd44d9b5402a6ec8bf' into security
Updating branch base to 1.532.
2014-07-30 17:39:01 -07:00
Jesse Glick b6b2a367a7 [FIXED SECURITY-109] SECURITY-55 fix to BuildTrigger configuration failed if downstream project was not visible. 2014-02-11 14:22:46 -05:00
Jesse Glick bf53919856 [FIXED SECURITY-93] PasswordParameterDefinition should serve existing default value in encrypted form.
And strengthen functional tests (using configRoundTrip) to ensure that the same mistake is not made elsewhere.
2014-02-11 14:19:39 -05:00
Jesse Glick 41a4ef6526 Random failure.
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/1199/testReport/hudson.tasks/FingerprinterTest/fingerprintCleanup/
java.lang.AssertionError: expected:<[hudson.model.FreeStyleProject@590e5b8[test0]]> but was:<[]>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:743)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at hudson.tasks.FingerprinterTest.fingerprintCleanup(FingerprinterTest.java:302)
2013-09-16 17:23:33 -04:00
Jesse Glick 8c59dc7939 JUnit 4.
And ignoring an occasionally failing test:
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/1198/testReport/junit/hudson.model/UpdateCenter2Test/testInstall/
Sep 16, 2013 12:39:53 PM com.gargoylesoftware.htmlunit.html.HtmlPage loadJavaScriptFromUrl
SEVERE: Error loading JavaScript from [http://localhost:50727/update-center.json?id=default&version=1.532-SNAPSHOT%20(private-09%2F16%2F2013%2015%3A35%20GMT-jenkins)].
java.io.IOException: GET http://localhost:50727/update-center.json?id=default&version=1.532-SNAPSHOT%20(private-09%2F16%2F2013%2015%3A35%20GMT-jenkins) failed
	at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:130)
	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1456)
	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1387)
	at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:988)
	at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:953)
	at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:359)
	at com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:223)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.processPostponedActions(JavaScriptEngine.java:556)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:487)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:451)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:522)
	at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:458)
	at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:918)
	at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182)
	at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200)
	at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:619)
	at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886)
	at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
	at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891)
	at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1133)
	at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:177)
	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:456)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:332)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:389)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:374)
	at org.jvnet.hudson.test.HudsonTestCase$WebClient.goTo(HudsonTestCase.java:1811)
	at org.jvnet.hudson.test.HudsonTestCase$WebClient.goTo(HudsonTestCase.java:1802)
	at org.jvnet.hudson.test.HudsonTestCase$WebClient$goTo.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at hudson.model.UpdateCenter2Test.testInstall(UpdateCenter2Test.groovy:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at org.jvnet.hudson.test.HudsonTestCase.runTest(HudsonTestCase.java:428)
	at junit.framework.TestCase.runBare(TestCase.java:141)
	at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:290)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:150)
	at java.net.SocketInputStream.read(SocketInputStream.java:121)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
	at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
	at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:101)
	... 55 more
2013-09-16 14:00:31 -04:00
Oliver Gondža 37d1b8d7a4 Merge pull request #855 from olivergondza/node-permissions 2013-09-16 11:00:22 +02:00
Oliver Gondža 83d5ac10a5 [JENKINS-18485] Enable Computer.EXTENDED_READ permission using "hudson.security.ExtendedReadPermission". 2013-09-12 17:05:06 +02:00
Jesse Glick b74750934c Merge branch 'master' into ArtifactManager-JENKINS-17236
Conflicts:
	core/src/main/java/hudson/FilePath.java
	core/src/main/java/hudson/tasks/ArtifactArchiver.java
2013-09-12 07:57:32 -04:00
Jesse Glick 259f16bdad [JENKINS-19034] Noting. 2013-09-12 07:49:17 -04:00
Jesse Glick 62ed20ee3f Merge pull request #891 from ndeloof/JENKINS-19034
[FIXED JENKINS-19034] restore missing buildnumber-ID symlink
2013-09-12 04:47:40 -07:00
Kohsuke Kawaguchi ac274f153b [JENKINS-19457]
Added a test case in an attempt to isolate the root cause of the problem, but this one works as expected. Hmm.
2013-09-05 10:40:05 +02:00
Vincent Latombe b2c20fd9db Simplify assertions since webClient#getPage already throws an exception
in case of erroneous http status code.
2013-09-04 09:29:11 +02:00
Oliver Gondža 18582f8c6d Bump args4j to 2.0.23 as an alternative to #776 2013-09-01 23:03:19 +02:00
Oliver Gondža 83410feb4e Add tests for #919 2013-09-01 20:07:25 +02:00
Vincent Latombe 6031878c80 Checking that links generated in ListView are valid 2013-08-31 11:19:26 +02:00
Stefan Wolf 3bf39c16f9 Merge pull request #916 from wolfs/aggregate-test-result
[FIXED JENKINS-9637] Fixed the 404 when clicking the testResult on the Project Page when there is only an aggregated test result.
2013-08-30 13:25:44 -07:00
Jesse Glick bf444887ac [FIXED JENKINS-19377] ViewJob.removeRun must take effect synchronously or LogRotator gets confused. 2013-08-27 12:22:26 -04:00
Jesse Glick 2c428d8096 @DataBoundConstructor does not belong on constructos of abstract classes. 2013-08-26 16:50:44 -04:00
Stefan Wolf 58e8bd7a2e [FIXED JENKINS-9637] Fixed the 404 when clicking the testResult on the Project Page when there is only an aggregated test result for a freestyle job. The name of the link is still wrong. 2013-08-23 16:14:08 +02:00
Stefan Wolf 629be4ab30 [FIXED JENKINS-9637] Fixed the 404 when clicking the testResult on the Project Page when there is only an aggregated test result for a freestyle job. The name of the link is still wrong. 2013-08-23 15:58:30 +02:00
Nicolas De Loof 2f7520c3d4 [FIXED JENKINS-19034] restore missing buildnumber-ID symlink when updating permalink 2013-08-23 15:35:55 +02:00
Jesse Glick 862544b249 Satisfy DirectoryBrowserSupport with a new VirtualFile. 2013-08-21 16:38:27 -04:00
Jesse Glick 01fa0201fc First draft of reworked artifact listing API. 2013-08-21 14:05:25 -04:00
Jesse Glick f846169fb5 Moving what is essentially unit test code out of the test harness module. 2013-08-21 13:06:17 -04:00
Jesse Glick a3d099b652 ArtifactManagerFactory/ArtifactManagerConfiguration to let the administrator select what to use. 2013-08-20 17:46:55 -04:00
Jesse Glick 4ef0018101 Merge branch 'master' into ArtifactManager-JENKINS-17236
Conflicts:
	core/src/main/java/hudson/model/Run.java
	test/src/test/java/hudson/maven/MavenMultiModuleTest.java
2013-08-20 13:18:23 -04:00
Jesse Glick a92e9da978 [FIXED JENKINS-18846] Update symlinks for Maven module builds. 2013-08-20 13:05:21 -04:00
Jesse Glick 34a461eb40 Queue up artifacts from a Maven build so they can all be archived in one call (per module). 2013-08-19 14:26:53 -04:00
Vojtech Juranek cc2bc4249c Add test for PR #909 2013-08-16 13:21:53 +02:00
Oliver Gondža 5db147e858 [FIXED JENKINS-18485] Introduce Computer.EXTENDED_READ permission
From now on user needs:
      Computer.CREATE to use 'create-node' CLI command
      Computer.DELETE to use 'delete-node' CLI command
      Computer.CONFIGURE to use 'update-node' CLI command and its REST alternative
      Computer.EXTENDED_READ to use 'get-node' CLI command and its REST alternative
2013-08-13 20:27:06 +02:00
Jesse Glick 4d8bfb5538 [FIXED JENKINS-19186] Robustness against malformed test result XML. 2013-08-13 12:48:46 -04:00
Jesse Glick adec3bb0c5 Random failure.
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/1065/testReport/junit/hudson.model/ProjectTest/testPoll/
2013-08-09 21:56:45 -04:00
Jesse Glick ec9d809ddd [FIXED JENKINS-16918] Use HTTP 405 when POST is required. 2013-08-09 19:57:56 -04:00
Kohsuke Kawaguchi 7232798611 [FIXED JENKINS-19124]
Added another attribute 'checkDependsOn' on <input> elements (akin to
'fillDependsOn', etc) to list up the other dependency controls, and
insert appropriate onchange events.

'checkUrl' is now just the stem portion of the URL to invoke, and
the client script builds up the query parameters.
2013-08-08 16:24:09 -07:00
lvotypko 850f55f077 Fix NullPointerException which is possible in concurrent builds. 2013-08-05 13:12:00 +02:00
lvotypko 6aaf6db458 Fix failure of tests 2013-08-04 10:43:58 +02:00
Jesse Glick 69fe8f30c8 Merge branch 'master' of github.com:jenkinsci/jenkins 2013-08-02 16:12:33 -04:00
Jesse Glick af2c899452 Ignoring currently failing tests. 2013-08-02 16:12:03 -04:00
Oliver Gondža 72901837db [FIXED 10539] Preserve backslash in Matrix buildstep properties 2013-08-02 21:55:43 +02:00
Jesse Glick 50cda8ca19 Merge pull request #848 from Vlatombe/improve-search
Improve search to look for items inside ItemGroup
2013-08-02 12:44:49 -07:00
Jesse Glick 8697ec2947 JUnit 4. 2013-08-02 14:16:38 -04:00
Kohsuke Kawaguchi 6588f42904 [FIXED JENKINS-19042]
Added a new overloaded version that works on a project.

Updated CoreEnvironmentContributor accordingly.
2013-08-01 14:54:29 -07:00
Oliver Gondža f18f89d6a0 Avoid deprecated junit.framework.Assert, use org.junit.Assert instead 2013-08-01 15:50:42 +02:00
Vojtěch Juránek 96edfca548 Merge pull request #888 from lvotypko/ProjectTest
Add tests for Project class
2013-07-31 16:31:04 -07:00