Commit Graph
14254 Commits
Author SHA1 Message Date
Yaroslav Afenkin 4bf648811f [SECURITY-3245] 2023-09-06 11:17:19 +00:00
Daniel Beck b8ac8cd4c5 [SECURITY-3261] 2023-09-06 11:17:14 +00:00
Vincent Latombe e79ac42baa Merge pull request #8448 from Vlatombe/labelAtomSet-robustness
Label parsing robustness fix
2023-09-02 11:49:37 +02:00
Basil Crow 33dc1fb2b4 [JENKINS-71950] List plugins in deterministic order (#8453)
List plugins in deterministic order
2023-09-01 18:00:06 -06:00
Daniel BeckandDaniel Beck 95373a96f7 Add telemetry for security-related settings (#8440)
* Add telemetry for security-related settings

* Actually include component information

* FindBugs, also TcpSlaveAgentListener can be null

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-08-31 20:14:11 +02:00
Vincent LatombeandDaniel Beck 9a9cac88d3 Apply suggestions from code review
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2023-08-31 13:56:57 +02:00
Vincent Latombe 7cbb82cdc2 Fix spotbugs/checkstyle 2023-08-31 13:24:13 +02:00
Vincent Latombe 4a708e2b0a In case an extension of Slave overrides readResolve but does not call its super implementation
recover from it, and issue a warning to raise a bug against the impacted plugin.
2023-08-31 09:44:22 +02:00
Vincent LatombeandJesse Glick 7b1dfd8d83 Initialize default view earlier in the init process. (#8413)
* Initialize default view earlier in the init process.

Perform the default view initialization next to loading the
configuration from disk.

This is more consistent as the primary view and views are cleared just
before loading from disk, which leads to a temporary inconsistent state while
Jenkins initializes.

* Update core/src/main/java/jenkins/model/Jenkins.java

Co-authored-by: Jesse Glick <jglick@cloudbees.com>

* View initialization should happen even when the config file doesn't exist.

* Add a test

---------

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2023-08-29 18:59:14 +02:00
Tim Jacomb d7da362feb Add Appearance system configuration page (#8403)
* Add `Appearance` system configuration page

* Use one-column layout

* Add developer guidance
2023-08-29 09:32:38 +01:00
Daniel BeckandDaniel Beck 262e65cdff Fix PCT problem of #8250 (#8426)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-08-25 14:19:48 +01:00
16bf84c330 [JENKINS-71087] Nicer 404 error pages (#8250)
* Nicer 404 error pages

* Fix test, expose custom error message on 404 pages

* Record the current user to show an appropriate 404 page

* 404 simple page for the resource domain

the resource domain has no access to the static resources like
javascript and css. Open the images in the filter so we can at least
show an image.
Do not show the hint about not found or permission when accessing the
static-files url from the regular domain.

* Minor fixes and improvements

- Be more restrictive, only allow the specific image on simple 404
- Make extra resources work with non-empty resources path
- Do not redirect to 404 page after login from regular 404 page
- Remove 'Error:' prefix for friendlier page appearance
- Include favicon etc. resources in simple 404 page

* Fall back to 'Not Found' when accessing error pages directly

Also reformat

* Add 404 page tests

* Revert change to ResourceDomainTest

* Move test out of JenkinsTest, make parameterized for different contexts

* Return to the 404'd page after login by using 'from' session attribute

* Prevent 'REST API' link from showing on the error page

* Assert specific message on resource domain

* Remove obsolete commented out line

* Add Javadoc

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Markus Winter <m.winter@sap.com>
2023-08-23 07:27:21 +01:00
Vincent Latombe 76bfee23a0 Optimize Label parsing calls (#8395)
* Optimize Label#parse for simple label

For a simple label, this speeds up lookup of an existing simple label (no expression used):  16ns vs 106ns (6x faster)

* Fix reviews

* Fix include

* Avoid parsing label every time getAssignedLabels is called

* Store Set<LabelAtom> at Node descendants level
* Compute it whenever labelString is updated

* Fix spotbugs / test issue

* Make it restricted
2023-08-23 07:26:24 +01:00
Daniel BeckandDaniel Beck ee02eec256 [JENKINS-71848] Remove admin monitors popup from /manage/ again (#8388)
[JENKINS-71848] Remove admin monitors popup from /manage/ again

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-08-21 23:25:19 +02:00
Jesse Glick 7f3fa048ca [JENKINS-61452] Tolerate corrupt Base64 in PlainTextConsoleOutputStream (#8378) 2023-08-19 18:08:49 +01:00
SujathaH 4a262f5e71 Replace MD5 digest with SHA256 while logging payload in Mock class called from tests (#8319) 2023-08-11 17:59:26 +02:00
Markus Winter a53112d63f [JENKINS-71744] Fix context menu (#8322)
[JENKINS-71744] fix context menu
2023-08-05 04:43:28 -06:00
Jesse Glick 3d74c37b76 DescribableList.replace called Saveable.save twice (#8303) 2023-08-01 10:43:32 +02:00
Jesse Glick d841f1d1f7 Simpler Jenkins.getComputers (#8299) 2023-07-29 16:39:22 +02:00
YaroslavandYaroslav Afenkin 521da3275e [JENKINS-71054] Remove the treeview option for artifactList (#8265)
Co-authored-by: Yaroslav Afenkin <yaroslavafenkin@users.noreply.github.com>
2023-07-29 16:38:26 +02:00
Zhun-Wei Liu c8a395abea [JENKINS-71186] - Improve socket creation on TcpSlaveAgentListener (#8288) 2023-07-27 22:44:52 +02:00
Jan Meiswinkel d6fb182e2e Add logging for agent usage by job (#8283) 2023-07-26 17:25:54 +02:00
Matt Pulver 1e7e2417de [JENKINS-71366] Set sandbox allow-same-origin in DEFAULT_CSP_VALUE. (#8273) 2023-07-26 17:23:14 +02:00
Yaroslav Afenkin a310e0d900 Merge branch 'security-master' 2023-07-18 18:06:11 +03:00
bbb977cee5 Remove deprecated DIR_SEPARATOR and LINE_SEPARATOR (#7641)
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2023-07-14 11:39:13 +02:00
Yaroslav Afenkin 1b9f1ccdbb [SECURITY-3188] 2023-07-13 07:24:44 +00:00
1ec59c737a [JENKINS-71438] Replace browser confirm with modal dialogs (#7938)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
2023-07-12 08:13:18 +01:00
Jesse Glick 8de949bb31 LazyBuildMixIn.getEstimatedDurationCandidates duplication (#8233) 2023-07-11 17:34:49 +02:00
df4972fb70 [JENKINS-70059] Improve Safe Restart interface and user information (#7355)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
2023-07-07 08:34:40 +01:00
Mark Waite 211f67a464 Read end of life data file less often (#8220)
Remember the lines that were read from the file and the last file that was
read so that the next iteration can reuse the data that was already read.
No need to read `/etc/os-release` once for each entry in the JSON file.
The contents of the file won't change from the first entry to the last
entry in the JSON file.

This won't change much, since the read operation is probably already
cached by the operating system with a file as small as `/etc/os-release`.

Cached file content is deleted at the end of the loop over the JSON file.
2023-07-06 19:00:47 -06:00
Vincent Latombe d99bafdebd [JENKINS-71553] Add history widget factory for job not implementing Queue.Task (#8221)
[JENKINS-71553] Add history widget factory for job not implementing Queue.Task

like hudson.model.ExternalJob
2023-07-03 11:02:32 -06:00
Basil CrowandMark Waite 7cbe60fa5e Non-varargs call of varargs method with inexact argument type for last parameter (#8205)
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2023-06-30 17:53:21 +02:00
Alexander Brandes 9e65c05201 Fill in todo annotations (#8209) 2023-06-29 20:39:53 +02:00
cui fliter aa983a734c Fix a typo in DomainValidator's docs (#8163)
fix some typos

Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-19 13:20:49 +02:00
Basil Crow 8240e0736c Remove usages of org.apache.commons.io.output.NullOutputStream (#8144) 2023-06-16 08:44:01 +01:00
Basil Crow a9cbc1df87 Remove usages of org.apache.commons.io.input.NullInputStream (#8145) 2023-06-16 08:43:55 +01:00
Basil Crow 77f024ae6b Remove usages of org.apache.commons.io.output.ByteArrayOutputStream (#8146) 2023-06-16 08:43:50 +01:00
Basil Crow d3417ebec9 Forward compatibility for Commons IO 2.13.0 in hudson.Util#loadFile (#8142) 2023-06-15 09:57:18 +02:00
Jesse Glick eaf91000cb TransientActionFactory cache simplification (#8048)
* `TransientActionFactory` cache simplification

* Fixing mocks in `HistoryPageFilterTest`
2023-06-14 09:31:28 +02:00
Basil Crow ffd2afe45b Deprecate hudson.util.NullStream (#8128) 2023-06-14 09:31:17 +02:00
Jesse Glick 9be693daae Clean up DoubleLaunchChecker (#8127) 2023-06-14 09:31:09 +02:00
Basil Crow 6b47363c22 Deprecate hudson.util.IOUtils#skip (#8126) 2023-06-14 09:30:58 +02:00
Vincent Latombe 96620b0aa8 Merge pull request #7932 from Vlatombe/pluggable-widgets 2023-06-08 17:47:56 +02:00
Basil Crow 41edd5faf4 Remove usages of IOUtils#toByteArray (#8098) 2023-06-08 16:18:12 +02:00
Basil Crow d54041e24a Move from javax.inject to jakarta.inject (#8065)
* Move from `javax.inject` to `jakarta.inject`

* https://github.com/jenkinsci/jenkins/pull/8065#pullrequestreview-1451239883
2023-06-05 22:49:35 +02:00
Vincent Latombe 5e27528b36 Merge branch 'master' into pluggable-widgets 2023-06-05 17:39:29 +02:00
Michael KepplerandAlexander Brandes 9061e7bc23 [JENKINS-71244] Avoid relative link in update center (#7992)
* convert the relative link to an absolute one, since it might be used
in different contexts (with different depth from the server root
directory)
* update all message bundles to use the new format argument

Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-05-31 14:57:09 +02:00
Jesse Glick fe52887da2 Lazy-load-friendly Job.getEstimatedDurationCandidates (#7998) 2023-05-29 16:00:42 +01:00
Vincent Latombe cb1d2dc532 Make Cloud#reconfigure public as it is necessary for downstream implementations (#8053) 2023-05-29 16:00:23 +01:00
Vincent Latombe 34893ce42f Fix reviews, give unique symbols 2023-05-26 10:44:46 +02:00