Commit Graph
13079 Commits
Author SHA1 Message Date
Jesse Glick 14d676bb15 [FIXED JENKINS-25788] RunMap.remove was always returning false, even when the Run was in fact removed.
(cherry picked from commit ce94579c50)

Conflicts:
	changelog.html
2015-01-06 20:55:46 +01:00
Richard Mortimer ea6baf9a10 [FIXES JENKINS-24272] jnlp slaves fail to reconnect when master is restarted
During master restart only attempt to reconnect the slave after the master has
finished restarting.

(cherry picked from commit 48e19c58f9)
2015-01-06 20:43:21 +01:00
Jesse Glick 5ded56a828 [FIXED JENKINS-25937] Treat BadPaddingException as an unloadable key and continue.
(cherry picked from commit 6318b8d800)

Conflicts:
	changelog.html
2014-12-22 00:01:44 +01:00
Jesse Glick 5e02457709 Misleading error message.
(cherry picked from commit e4c5c71042)
2014-12-22 00:01:22 +01:00
Jesse Glick 23e0d6ad19 [FIXED JENKINS-25759] Avoid consuming too much memory while running validateAntFileMask.
Not fully solved, since the scannedDirs field can still grow to be large, but at least clearing files/dirsNotIncluded.
Also imposing a 5s timeout on the scan regardless of file count, and defining a user-customizable bound.
(cherry picked from commit 534328b264)

Conflicts:
	changelog.html
2014-12-21 19:33:05 +01:00
Jesse Glick bd0453fe98 [FIXED JENKINS-25655] Incorrect caching from entrySet sometimes caused incorrect results.
Caused a failure in hudson.plugins.promoted_builds.conditions.ManualConditionTest.testManualPromotionProcessViaWebClient when run against 1.580.1.
(cherry picked from commit b76e7bf998)
2014-12-21 19:29:21 +01:00
Kohsuke Kawaguchi be34b675f0 [FIXED JENKINS-25144] Revisiting the attempted fix in the previous commit.
IIUC, the issue here is that the request in question contains both a
valid session cookie AND basic authentication header, and that path
results in a failure because BasicHeaderProcessor expects one of
BasicHeaderAuthenticators to validate the basic authentication header
(without knowing that there's already a valid Authentication object that
came from the HTTP session, yet no BasicHeaderAuthenticator actually
processes this because BasicHeaderRealPasswordAuthenticator backs away
from doing that.

I think the corect fix is for BasicHeaderRealPasswordAuthenticator to
get rid of authenticationIsRequired check. This check instead belongs to
BasicHeaderProcessor, where it should be used to check if any
BasicHeaderAuthenticator should be consulted or not.

The problem with having this logic in
BasicHeaderRealPasswordAuthenticator is that this is just an
implementation of an extension point, and thus it needs to be removable.
As it stands right now in this fix, if this impl is removed,
JENKINS-25144 will be back again.

(cherry picked from commit 9e81b8e4fe)
2014-12-21 19:26:50 +01:00
Christof Schoell 7169a39165 [JENKINS-25144]
return authentication object instead of null if authentication is not
required - otherwise valid login fails with basic authentication

(cherry picked from commit 0176b6d902)
2014-12-21 19:26:50 +01:00
N Nachiappan cca17cc4f6 [FIXED JENKINS-25473] move config file check as part of loading job to do it in multithread fashion than in a single thread
(cherry picked from commit dc547cf297)
2014-12-21 19:11:20 +01:00
Jesse Glick 4629122c55 [FIXED JENKINS-25074] Make sure to call Job.getBuildHealthReports just once per t:buildHealth render.
(cherry picked from commit f463abbe53)

Conflicts:
	changelog.html
2014-12-21 19:03:03 +01:00
Kohsuke Kawaguchi 03600e925c [maven-release-plugin] prepare release jenkins-1.580.2 2014-12-15 11:15:16 -08:00
Jesse Glick 8478e24609 [FIXED JENKINS-25400] Rework fix of JENKINS-22769 (c04cdcd) to put the burden on each listener to impersonate ACL.SYSTEM if it needs to.
(cherry picked from commit a6a3d5e166)

Conflicts:
	changelog.html
2014-11-08 11:19:08 +01:00
Jesse Glick b70313476a [JENKINS-21224] Defend against exceptions in listeners, for now just for ItemListener.
java.lang.RuntimeException: Unable to copy /…/jobs/…/config.xml
	at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewHistoryEntryAndCopyConfig(FileHistoryDao.java:252)
	at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewItem(FileHistoryDao.java:238)
	at hudson.plugins.jobConfigHistory.JobConfigHistoryJobListener.onCreated(JobConfigHistoryJobListener.java:31)
	at hudson.model.listeners.ItemListener.fireOnCreated(ItemListener.java:161)
	at jenkins.model.Jenkins.putItem(Jenkins.java:2483)
	at …
Caused by: java.io.FileNotFoundException: /…/jobs/…/config.xml (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at hudson.plugins.jobConfigHistory.FileHistoryDao.copyConfigFile(FileHistoryDao.java:178)
	at hudson.plugins.jobConfigHistory.FileHistoryDao.createNewHistoryEntryAndCopyConfig(FileHistoryDao.java:250)
	... 108 more
(cherry picked from commit 6825121f06)
2014-11-08 11:18:51 +01:00
Jesse Glick 0efd811adb [FIXED JENKINS-22769] ItemListener callbacks should run as SYSTEM since they sometimes do ACL-checked calls.
(cherry picked from commit c04cdcd9f7)

Conflicts:
	changelog.html
2014-11-08 11:18:49 +01:00
Oliver Gondža 8fbd44db2b Revert "[FIXED JENKINS-20108]"
This reverts commit 68eb26633b.
2014-11-08 11:12:30 +01:00
Oleg Nenashev be835bfcfb [JENKINS-19017] - Unit tests
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
(cherry picked from commit cc06ae78e3)
2014-11-07 15:19:16 +01:00
Oleg Nenashev fff888cc82 [FIXED JENKINS-19017] - FileParameter - Handle non-null file parameters as different values
The change prevents the issue when Jenkins merges builds with different files coming from one source (It may happen!).

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
(cherry picked from commit 7c4f6b7ef4)
2014-11-07 15:19:16 +01:00
Daniel Beck b73bb3d0af Merge pull request #1306 from bkmeneguello/post-cancel-shutdown
[FIXED JENKINS-23020 JENKINS-23942] Convert the queue's cancel shutdown to POST
(cherry picked from commit fda84f456f)
2014-11-07 15:08:01 +01:00
Kohsuke Kawaguchi 68eb26633b [FIXED JENKINS-20108]
Integrated the trilead with SecureRandom instantiation fix.

(cherry picked from commit 70f5968160)

Conflicts:
	changelog.html
	core/pom.xml
2014-11-07 15:01:08 +01:00
Oleg Nenashev 1b0d8fb63a [FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false
This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check.
As an example, Subversion plugin behaves in such way (JENKINS-24341)

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
(cherry picked from commit a78f1d3246)
2014-11-07 14:59:51 +01:00
Jesse Glick 3eefad8d30 [FIXED JENKINS-25081] Memory leak in BoundObjectTable when ProgressiveRendering is used.
(cherry picked from commit aac8c23972)

Conflicts:
	changelog.html
2014-11-07 14:56:38 +01:00
Nicolas De Loof a4a28fb87f [FIXED JENKINS-24825] define hudson.model.AbstractItem#movedTo
(cherry picked from commit 9b3f48853d)

Conflicts:
	changelog.html
2014-11-07 14:47:12 +01:00
Kohsuke Kawaguchi 3229bdaac8 [maven-release-plugin] prepare for next development iteration 2014-10-29 21:06:06 -07:00
Kohsuke Kawaguchi 388fa0b44a [maven-release-plugin] prepare release jenkins-1.580.1 2014-10-29 21:06:06 -07:00
Jesse Glick 0d24f2d288 Merge branch 'SECURITY-144' into SECURITY-144-stable-1.580 2014-10-28 11:18:50 -04:00
Kohsuke Kawaguchi 9a108de405 These permissions should be RUN_SCRIPTS
... as it grants access to the JVM internals of the master in the same
Groovy scripts do.
2014-10-27 15:39:46 -07:00
Jesse Glick 2269703ee7 Merge branch 'SECURITY-144' into SECURITY-144-stable-1.580
Conflicts:
	pom.xml
2014-10-26 13:45:02 -07:00
Jesse Glick 8c06d5fb07 If not enabled by default, need to change wording. 2014-10-20 10:05:49 -04:00
Kohsuke Kawaguchi 4ab018a078 Merge branch 'SECURITY-144' into SECURITY-144-stable-1.580 2014-10-18 20:30:28 -07:00
Kohsuke Kawaguchi 8632efc35f Allowing (and encouraging) rules in config file to use '/' as separator.
Based on comments from Daniel Beck and Jesse Glick in 37a3dda
2014-10-18 20:03:38 -07:00
Kohsuke Kawaguchi ef2dd2473b $JENKINS_HOME might contain symbols that are interpreted as regular expression 2014-10-18 19:55:28 -07:00
Kohsuke Kawaguchi b4ffb2d01b More follow-up renames 2014-10-18 19:47:19 -07:00
Kohsuke Kawaguchi 7376aa0e29 Renamed package. 2014-10-18 19:39:21 -07:00
Kohsuke Kawaguchi 062f9d4845 Show the warning & config only when it's relevant 2014-10-18 19:34:57 -07:00
Kohsuke Kawaguchi 5db8cecae3 Added a AdminMonitor to to warn when this subsystem is disabled
... unless a few conditions indicate that it is likely irrelevant.
2014-10-18 18:51:25 -07:00
Kohsuke Kawaguchi e24ceef22a Disabling this subsystem by default.
As much as we'd like to enable this by default, what we've learned over
the past few days indicate that this is just too disruptive a change. In a nutshell,

 - The change is just too big. It touches more than 4000 lines just in the core and remoting,
   which makes this by far the biggest change we've done in secret. The chance of something
   going wrong is just too high. As recently as yesterday we are still finding significant
   problems with this subsystem.

 - We've learnt that Subversion 1.x contains Callables that we cannot just whitelist, but
   that version is used by roughly a third of users. If we put this on by default, they will
   see their builds break.

 - Every time we come up with a new way to scan plugins to find impacted code, we always
   find several plugins that are affected, indicating that we probably have missed more
   plugins that will be impacted.

 - We haven't really analyzed past versions of any plugins at all, but as the Subversion
   version distribution indicates, considerable portion of people run old plugins.

As we see in the Wiki page (http://jenkins-ci.org/security-144), vast majority of Jenkins
installations will fit in the category of "I have set up Jenkins master and all slaves by
myself", for whom this subsystem is entirely redundant.

Based on the knowledge we now have about the impact of this addition, and considering people
who benefit from this vs people who don't benefit from this, I'm not enabling this feature
out of the box, just yet.

Our plan is to advertise this feature, then get necesary plugin updates in place over time.
At some later point, we can make this feature on by default, which will only impact new
installations. Further down the road, we can inch up the warning given to people who run
without this feature, or remove the GUI configuration and force this feature on, to get
close to the ideal state of having everyone run with this feature on.

Jesse doesn't like this, but I think he understands where I'm coming from. Sorry Jesse,
this time I'm having this my way.
2014-10-18 18:20:09 -07:00
Kohsuke Kawaguchi 8a105ce57c Adding separate check for symlink to prevent jailbreak
Otherwise a symlink can be created to point to a file outside $JENKINS_HOME and be read
2014-10-17 19:03:55 -07:00
Kohsuke Kawaguchi ec1e47c053 Change the name because this directory is shared by all secrets 2014-10-17 18:55:05 -07:00
Kohsuke Kawaguchi 9342558ab1 Based on a discussion with Daniel Beck, implemented a master kill switch as an admin configurable feature.
The wiki page already talks about how an admin can do this: https://wiki.jenkins-ci.org/display/JENKINS/Slave+To+Master+Access+Control#SlaveToMasterAccessControl-Disabletheaccesscontrolmechanismaltogether

There's a risk in making this too easy, but we keep finding more plugins that need SECURITY-144 adjustments, and I'm really worried
about SECURITY-144 fix blowing up in the face of too many people.
2014-10-17 18:51:57 -07:00
Kohsuke Kawaguchi 7c9c5c73e8 Path related changes & Windows fix
- Added <JOBDIR> based on Daniel's comment
- Path macros need to be translated if on Windows
- Windows treat '/' as a valid path separator, so it needs to be normalized to '\\'.
2014-10-17 18:08:35 -07:00
Kohsuke Kawaguchi e8adb10bcb tightening up the treatment of access to directory itself 2014-10-17 16:10:01 -07:00
Kohsuke Kawaguchi 37a3ddaaed Path has to be in Windows format on Windows 2014-10-17 16:07:41 -07:00
Kohsuke Kawaguchi ee16f8b63b Fixing another inconsistency.
Most other files are local, so 'gui.conf' better explains what they are.
2014-10-17 15:37:08 -07:00
Kohsuke Kawaguchi aec88b73b5 Fixing inconsistency.
Daniel Beck pointed out that if we ask people to create files not writable from Jenkins as a means to suppress edit to gui.conf,
then we should just stick to the same approach all the way.
2014-10-17 15:37:08 -07:00
Kohsuke Kawaguchi 050b0e7588 set a shorter ID to make URL bit nicer 2014-10-17 15:37:08 -07:00
Kohsuke Kawaguchi bc4d0e1824 Adding new line like elsewhere 2014-10-17 15:37:08 -07:00
Kohsuke Kawaguchi 6ff47b37f6 Need to guide the users to SECURITY-144 landing page 2014-10-17 15:37:08 -07:00
Jesse Glick 57b38ecfb7 Merge branch 'SECURITY-144' into SECURITY-144-stable-1.580 2014-10-17 17:23:50 -04:00
Jesse Glick 14f05e9141 One more entry. 2014-10-17 17:20:47 -04:00
Jesse Glick da0f7e84e9 Adding a couple of whitelist entries. 2014-10-17 16:44:40 -04:00