Commit Graph

50613 Commits

Author SHA1 Message Date
Phillip Webb
5719fab142 Merge branch '1.2.x' 2015-12-14 18:58:25 +00:00
Phillip Webb
edb16a13ee Protect against SpEL injections
Prevent potential SpEL injection attacks by ensuring that whitelabel
error view SpEL placeholders are not recursively resolved.

Fixes gh-4763
2015-12-14 18:49:59 +00:00
Stephane Nicoll
004fa11b81 Merge pull request #4753 from anandshah123/master
* pr/4753:
  Polish contribution
  Add constants for banner location
2015-12-14 18:13:35 +01:00
Stephane Nicoll
e9dfb2292e Polish contribution
Closes gh-4753
2015-12-14 18:13:24 +01:00
Anand Shah
ad1ae8df91 Add constants for banner location
Closes gh-4665
2015-12-14 18:08:29 +01:00
Andy Wilkinson
5cb9b9a9e9 Merge branch '1.2.x' 2015-12-14 16:49:55 +00:00
Andy Wilkinson
7d5cc3da63 Stop ActiveMQ pooled connection factory when context is closed
Previously, ActiveMQ's pooled connection factory was not closed as
part of the application context being closed. This would leave
non-daemon threads running which could cause shutdown to hang unless
the JVM itself was shutting down (in which case a shutdown hook would
stop the pool).

This commit configures each pooled connection factory bean with a
custom destroy method so that the pool is stopped as part of the
application context being closed. To allow the destroy method to only
be declared when the connection factory is pooled, the bean method
has been split into two; one for pooled and one for non-pooled. This
is a partial backport of the changes made in bedf2edf.

Closes gh-4748
2015-12-14 16:49:18 +00:00
Stephane Nicoll
35388b6d95 Clarify usage of Devtools with build plugins
Closes gh-4756
2015-12-14 15:16:30 +01:00
Stephane Nicoll
7cfe1609b1 Merge pull request #4770 from davidmorley/master
* pr/4770:
  Polish contribution
  Rename method to clarify which connector is being created
2015-12-14 14:49:28 +01:00
Stephane Nicoll
f269383803 Polish contribution
Closes gh-4770
2015-12-14 14:49:22 +01:00
David Morley
288aa962c4 Rename method to clarify which connector is being created
See gh-4770
2015-12-14 14:44:48 +01:00
Phillip Webb
3e7863d4b4 Fix checkstyle issue
See gh-4769
2015-12-14 11:55:50 +00:00
Phillip Webb
447edd2c4e Allow gzip compression without Content-Length
Ensure that gzip compression is applied when the `Content-Length` header
is not specified. Prior to this commit Tomcat and Jetty would compress a
response that didn't contain the header, but Undertow would not.

Fixes gh-4769
2015-12-14 11:44:21 +00:00
Phillip Webb
66070686cb Merge pull request #4504 from eddumelendez/gh-4461
* pr/4504:
  Add support for server.server-header property
2015-12-12 21:24:57 +00:00
Eddú Meléndez
1b81d9f0b5 Add support for server.server-header property
Add a `server.server-header` property which can be used to override the
`server` header usually sent back automatically by Tomcat/Jetty or
Undertow.

See https://www.owasp.org/index.php/Securing_tomcat for background.

Fixes gh-4461
Closes gh-4504
2015-12-12 21:24:29 +00:00
Stephane Nicoll
b2f1355e74 Merge pull request #4768 from izeye/polish-20151212
* pr/4768:
  Polish docs
2015-12-12 18:55:50 +01:00
Johnny Lim
4fbc6d810a Polish docs
Closes gh-4768
2015-12-12 18:55:34 +01:00
Phillip Webb
e25727ffae Merge pull request #4625 from vpavic/improve-audit-listeners
* pr/4625:
  Move publisher injection to abstract listeners
2015-12-12 11:23:41 +00:00
Vedran Pavic
c05432d221 Move publisher injection to abstract listeners
Push up publisher injection from AuthenticationAuditListener and
AuthorizationAuditListener to the abstract superclasses.

Closes gh-4625
2015-12-12 11:21:48 +00:00
Phillip Webb
39077ee56c Extract ExitCodeGenerators class
Extract exit code logic from SpringApplication to a new
`ExitCodeGenerators` class so that it can be reused.

Fixes gh-4757
2015-12-11 18:10:40 +00:00
Phillip Webb
34b31f1abc Protect against null description
Update `removeLineBreaks` to also work with `null`.

See gh-4703
2015-12-11 17:40:28 +00:00
Phillip Webb
ecf9ce46e7 Merge pull request #4672 from Shredder121/randomvalue-overflow
* pr/4672:
  Protect against Math.abs() with Long.MIN_VALUE
2015-12-11 15:52:26 +00:00
Ruben Dijkstra
3bd4771130 Protect against Math.abs() with Long.MIN_VALUE
Update RandomValuePropertySource to protect against the random source
returning Long.MIN_VALUE. In such cases the sign bit can't be unset and
prior to this commit the random value stayed negative.

Closes gh-4672
2015-12-11 15:52:17 +00:00
Phillip Webb
58fd403bd0 Merge pull request #4674 from vpavic/improve-health-aggregating
* pr/4674:
  Add AbstractHealthAggregator.aggregateDetails
2015-12-11 14:42:16 +00:00
Vedran Pavic
f8090d94b2 Add AbstractHealthAggregator.aggregateDetails
Extract aggregate details logic to a protected method that can be
overridden if required.

Closes gh-4674
2015-12-11 14:42:02 +00:00
Phillip Webb
0650610fff Merge pull request #4688 from mnhock/Replace_with_valueOf()
* pr/4688:
  Prefer valueOf() to create Number values
2015-12-11 14:06:53 +00:00
mnhock
fcf6e5d6eb Prefer valueOf() to create Number values
Update Long/Integer constructor calls with `valueOf` which can make use
of global caches.

Closes gh-4688
2015-12-11 14:04:25 +00:00
Phillip Webb
dc3ead4c39 Merge pull request #4703 from thorntonrp/patch-1
* pr/4703:
  Cleanup description new-lines for launch script
2015-12-11 14:01:07 +00:00
Robert Thornton
8e0b8750c0 Cleanup description new-lines for launch script
Replace all new-line characters in multi-line pom descriptions before
inserting into the launcher script. Prior to this commit the shell would
attempt to execut the extra lines, for example:

	<description>
		A multi-line pom description that could do something terrible:
		rm -r foo
	</description>

Closes gh-4703
2015-12-11 13:57:14 +00:00
Phillip Webb
a3a320d97b Merge pull request #4706 from mnhock/Calling_toString_is_redundant
* pr/4706:
  Remove redundant toString() call
2015-12-11 13:44:38 +00:00
mnhock
ea016f5442 Remove redundant toString() call
Closes gh-4706
2015-12-11 13:43:30 +00:00
Phillip Webb
7f8aff0231 Format HTML in web-ui sample 2015-12-11 13:41:38 +00:00
Phillip Webb
2f84cdc79f Merge pull request #4735 from dubu/dubu0.1
* pr/4735:
  Add update/delete to the web-ui sample
2015-12-11 13:40:30 +00:00
kozazz
0de4b6ce63 Add update/delete to the web-ui sample
Closes gh-4735
See gh-4733
2015-12-11 13:37:08 +00:00
Andy Wilkinson
ffbdfc586b Merge branch '1.2.x' 2015-12-11 11:26:45 +00:00
Andy Wilkinson
474ffa717e Upgrade to Spring Batch 3.0.6.RELEASE
Closes gh-4754
2015-12-11 11:25:54 +00:00
Andy Wilkinson
0bb4de490d Allow any ExitCodeGenerator bean to switch of auto-configured bean
In bedf2edf, the return type of the auto-configuration method that
creates batch's ExitCodeGenerator was changed from ExitCodeGenerator
to JobExecutionExitCodeGenerator but the on missing bean condition
was left unchanged. This means that the auto-configured bean can
only be switched off by a JobExecutionExitCodeGenerator bean, rather
than any bean that implements ExitCodeGenerator.

This commit corrects the use of @ConditionalOnMissingBean to allow any
ExitCodeGenerator bean to switch off the auto-configured one.

Closes gh-4752
2015-12-11 11:07:33 +00:00
Phillip Webb
0489a3b4de Polish 2015-12-10 19:43:29 +00:00
Phillip Webb
f3bcf94fb0 Refine validator cleanup logic
Refine the validator memory optimization so that only directly created
validators are nulled out. Also update the logic to ensure that
`destroy` is also called.

See gh-4734
2015-12-10 19:43:29 +00:00
Andy Wilkinson
bbbe4fdcd0 Start building against Spring Framework 4.2.4 snapshots
See gh-4644
2015-12-10 16:59:50 +00:00
Dave Syer
fae14b409f Check that we own the validator before nulling it out
See gh-4734
2015-12-10 16:04:31 +00:00
Phillip Webb
2d2e4eea82 Merge branch '1.2.x' 2015-12-10 15:01:29 +00:00
Stephane Nicoll
66fe95369c Polish doc
See gh-4743
2015-12-10 15:49:34 +01:00
Phillip Webb
2694605a4d Polish 2015-12-10 14:43:00 +00:00
Stephane Nicoll
59cb5cf8d9 Merge branch '1.2.x'
# Conflicts:
#	spring-boot-actuator/src/main/resources/META-INF/additional-spring-configuration-metadata.json
#	spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
2015-12-10 15:40:44 +01:00
Stephane Nicoll
ce2346b087 Reintroduce endpoints.metrics.filter.enabled
Commit 8c14009 removed the endpoints.metrics.filter.enabled property so
that endpoints.metrics.enabled is used for both disabling the endpoint
and the servlet filter that records interactions.

This was an unfortunate decision as it was no longer possible to only
disable the servlet filter. The endpoints.metrics.filter.enabled property
has therefore been restored.

Closes gh-4365
2015-12-10 15:37:10 +01:00
Andy Wilkinson
4f7752d467 Merge branch '1.2.x' 2015-12-10 13:45:15 +00:00
Andy Wilkinson
ce541bebcf Align BasicErrorController’s HTML response status with non-HTML status
Previously, BasicErrorController would return the response status
set in the javax.servlet.error.status_code request attribute when
serving JSON but would also return a 200 OK response when serving
HTML. This didn’t cause much trouble when a person was browsing, but
proved problematic for machine clients that request text/html and care
about the response status. For example, the success handler would be
driven for an XHR request even though the response was really an error.

This commit updates BasicErrorController to set the response status for
text/html responses to match the status that it would use in an
application/json response.

Closes gh-4694
2015-12-10 13:40:16 +00:00
Andy Wilkinson
03e19d4709 Upgrade to Spring REST Docs 1.0.1.RELEASE
Closes gh-4742
2015-12-10 11:26:07 +00:00
Andy Wilkinson
53cc5f060b Merge branch '1.2.x' 2015-12-10 11:25:00 +00:00