Commit Graph

453 Commits

Author SHA1 Message Date
Gary Russell
d10f537283 Dissallow traversal entry even for byte[]
The previous change prevents the transformer from writing a file outside of
the working directory.

However it still produced an entry for an errant file when producing just contents,
and not writing to the file system. However, the errant path would be added to the
message and might be used by subsequent components to write to the file system.

This situation is present in the `UnZip2FileTests`.

While this vulnerability is not directly exposed by the framework, user applications
could be affected by it.
2018-05-10 10:07:57 -04:00
Spring Buildmaster
8c4e18fde9 [artifactory-release] Next development version 2018-05-07 14:21:54 +00:00
Spring Buildmaster
01f0598ba8 [artifactory-release] Release version 1.0.0.RELEASE 2018-05-07 14:21:48 +00:00
Artem Bilan
8d1752cb98 Remove unnecessary check for the ..
The check for `startsWith(workDirectory)` in the target file
canonical path is fully enough
2018-05-04 15:06:18 -04:00
Spring Buildmaster
e7964f7175 [artifactory-release] Next development version 2018-05-03 14:27:19 +00:00
Spring Buildmaster
e9eaca970b [artifactory-release] Release version 1.0.1.RELEASE 2018-05-03 14:26:58 +00:00
Gary Russell
cca0ba147b Upgrade to Gradle 4.7 2018-05-03 09:43:53 -04:00
Artem Bilan
a5573eb232 Disallow traversal entity in zip
When the file name holds path traversal file names it gets
concatenated to the target extraction directory,
the final path ends up outside of the target folder.
2018-05-03 09:43:45 -04:00
Artem Bilan
c5602c4223 INTEXT-87: Add local-filter attribute
JIRA: https://jira.spring.io/browse/INTEXT-87
2018-04-26 11:23:40 -04:00
Artem Bilan
d9381460b2 GH-177: Create SMB files only in the SHARE_READ
Fixes spring-projects/spring-integration-extensions#177

* To avoid partial read, when other process may open the file and start
to write, it would be better to open SMB files in the `FILE_SHARE_READ`
mode.
This way only one process can write the file, when all of them can read
it
2018-04-26 11:07:28 -04:00
Artem Bilan
84b8c516b5 Upgrade to Gradle 4.7 and Log4J 2
* Rename XSD to version `1.0`
* Enable some Checkstyle rules and fix their violations
2018-04-26 10:34:36 -04:00
Prafull Kumar Sonii
fa98e45597 Upgrade SMB to Spring Integration 5.0
code style fixes
2018-04-26 10:08:20 -04:00
Artem Bilan
11b8990daf Polishing catch block in the LeaderInitiator 2018-02-09 15:44:22 -05:00
Artem Bilan
f9c7cccf75 GH-183: Fix lifecycle issues in the LeaderInitiator
Fixes https://github.com/spring-projects/spring-integration-extensions/issues/183

* Replace `Thread.sleep(Long.MAX_VALUE);` in the `LeaderSelector` main
loop with the `heartBeatMillis` to `tryLock` against the Hazelcast
periodically
* Add `busyWaitMillis` timeout in case of lost leadership or exception
from the Hazelcast
* Resubmit `LeaderSelector` in case of any exception exception
* Upgrade to the Hazelcast-3.8.9 and SI-4.3.14
2018-02-06 14:42:56 -05:00
Jorge
8c347877d9 ZipTransformer: Use FILENAME header if specified
If FILENAME is present at headers we must use this value as the name 
of zip file without conversion
2017-10-23 17:32:57 -04:00
Spring Buildmaster
45395e80e5 [artifactory-release] Next development version 2017-07-17 19:15:16 +00:00
Spring Buildmaster
ca5867f64b [artifactory-release] Release version Hazelcast 1.0.0.RELEASE 2017-07-17 19:15:09 +00:00
Artem Bilan
e03e6e553e Document HazelcastLockRegistry 2017-07-17 15:03:02 -04:00
Vinicius Carvalho
89e6274cc5 Initial implementation of HazelcastMetadataStore
HazelcastMetadataStore improvements
 - Adding ListenableMetadataStore capabilities
 - Extra tests for listeners

Requested changes from review

* Make `HazelcastMetadataStore.MapListener` as static class
2017-07-14 21:35:50 -04:00
Artem Bilan
01184c1304 Add HazelcastLockRegistry implementation 2017-07-13 19:15:06 -04:00
Artem Bilan
5511987be2 GH-172: Do not require local HZ instances
Fixes spring-projects/spring-integration-extensions#172

Since we can have an application based on the `HazelcastClient`, we don't need to require `Hazelcast.getAllHazelcastInstances()` be presented.

* Rework `HazelcastLocalInstanceRegistrar` to be able to accept external `HazelcastInstance` for `MultiMap` and `MembershipListener` registration
* If there is on local `Hazelcast.getAllHazelcastInstances()` just log a warn that we can't register `MembershipListener`
* Allow for `AbstractHazelcastMessageProducer` to accept events in the `CacheListeningPolicyType.SINGLE` mode when there is no local `Hazelcast.getAllHazelcastInstances()`
2017-07-07 20:22:51 -04:00
Vinicius Carvalho
894a60b8bb Add Hazelcast MessageStore implementation
- Hazelcast implementation of the `MessageStore`
- Test case uses the same tests as gemfire plus a couple of more scenarios
* Some polishing and Docs
2017-07-07 20:17:38 -04:00
Artem Bilan
6474ce9bb6 Upgrade to Gradle 4.0 and Checkstyle 8.0 2017-07-07 19:54:04 -04:00
Spring Buildmaster
0bd7d4e198 [artifactory-release] Next development version 2017-06-21 20:50:48 +00:00
Spring Buildmaster
410e58b948 [artifactory-release] Release version ZIP-1.0.0.RELEASE 2017-06-21 20:50:43 +00:00
Artem Bilan
deeeccc40b GH-160: Optimize UnZipResultSplitter
Fixes spring-projects/spring-integration-extensions#160

* Upgrade to `zt-zip-1.11`
* Polish README a bit
2017-06-21 16:46:22 -04:00
Artem Bilan
6f1b2babf6 Upgrade to Gradle 4.0 and SI-4.3.10 2017-06-21 15:47:16 -04:00
Artem Bilan
cfc8184993 GH-173: Leaders: Warn event errors, not re-throw
Fixes GH-173 (https://github.com/spring-projects/spring-integration-extensions/issues/173)

Currently when an error is thrown from the event publishing the role granting is broken and we just go to the role revoking.

* Since it's just an event publishing it shouldn't effect the original leader election.
* `try...catch` event publishing in the `LeaderInitiator` and `logger.warn` an `Exception`
2017-01-30 17:12:52 -05:00
Spring Buildmaster
848ae2d6a0 [artifactory-release] Next development version 2017-01-23 21:37:12 +00:00
Spring Buildmaster
541bea384d [artifactory-release] Release version 1.0.0.M2 2017-01-23 21:37:08 +00:00
Artem Bilan
4472a87e9c Fix LeaderInitiatorTests race condition
https://build.spring.io/browse/INTEXT-SIH1-10

When `LeaderInitiator` yields its leadership there is a good chance that it will obtain it back, so there is no guaranty that it isn't leader after revoking
2017-01-23 16:17:00 -05:00
Artem Bilan
6e7b4cfcc7 GH-169: Upgrade and prepare for release
Fixes GH-169 (https://github.com/spring-projects/spring-integration-extensions/issues/169)

* Upgrade Gradle and dependencies
* Apply Checkstyle
2017-01-23 15:33:30 -05:00
Spring Buildmaster
ab73b6cd2c [artifactory-release] Next development version 2017-01-17 22:47:25 +00:00
Spring Buildmaster
253512a442 [artifactory-release] Release version 0.5.0.RELEASE 2017-01-17 22:47:22 +00:00
Artem Bilan
1f5dbaab55 SMB: Polishing XSD according latest SI 2017-01-17 13:15:12 -05:00
Artem Bilan
0c7063588c GH-168: Upgrade to SI-4.3.6 and others
Fixes GH-168 (https://github.com/spring-projects/spring-integration-extensions/issues/168)
2017-01-16 13:04:55 -05:00
Artem Bilan
f4990eebd8 Downgrade to Gradle 2.14
Neither Bamboo (Artifactory Gradle), nor Spring IO plugin supports Gradle 3.x
2016-09-21 17:18:31 -04:00
Artem Bilan
9a13e41d96 GH-164: Fix ZipTransformer deleteFile Mode
Fixes GH-164 (https://github.com/spring-projects/spring-integration-extensions/issues/164)

* Move `deleteFile` logic to the end of of `ZipTransformer#doZipTransform()`
* Add `deleteFile = true` for the `ZipTransformerTests`
* Add `<request-handler-advice-chain>` to the transformers XSD definitions
* Upgrade to Gradle 3.0
* Upgrade dependencies

Move delete logic before reply message creation
2016-09-21 16:54:27 -04:00
Gary Russell
0ba841416b Fix Contributing Link 2016-07-11 05:17:08 -04:00
Artem Bilan
7e0443d34b Some upgrades and polishing 2016-07-06 17:09:19 -04:00
Dave Syer
92a01dbe29 Migrate leader election support from Spring Cloud
Fix `LeaderInitiator`

* Implement `SmartLifecycle` instead of just `Lifecycle`
* Add `Assert`s
* Rework logic from `IMap` for locks just into single `ILock`, since we require it only for the `role` as a key
* Fix `Future.cancel(true)` logic via rescheduling
See https://jira.spring.io/browse/INT-4058 and its commit comments
* Add more complex test-case to meet distributed requirements and verify several `yield()` cycles
2016-07-06 16:43:06 -04:00
englishman
8dcca5b676 INTEXT-219 Remain request headers after splitting
JIRA: https://jira.spring.io/browse/INTEXT-219

INTEXT-219: add unit test

INTEXT-219: fix missed headers

INTEXT-219: update file headers

INTEXT-219: simplify context

INTEXT-219: add test for preserving service header values

INTEXT-219: rename auxiliary methods

Code style polishing
2016-04-06 10:34:41 -04:00
erenavsarogullari
0efd494337 INTEXT-158: JavaConfig tests and upgrades
JIRA: https://jira.spring.io/browse/INTEXT-158

* Provide the test cases to demonstrate the Spring Integration Hazelcast adapters usage from the JavaConfig
* Upgrade to Hazelcast-3.6, SI-4.2.4, Gradle-2.5
* Fix Hazelcast-3.6 compatibility
* Fix failing tests
2016-01-26 15:24:58 -05:00
Spring Buildmaster
1759030fda [artifactory-release] Next development version 2016-01-08 09:24:48 -08:00
Spring Buildmaster
c6c154220d [artifactory-release] Release version 1.0.0.M1 2016-01-08 09:24:45 -08:00
Artem Bilan
cd37ecae9a ZIP: More Polishing 2016-01-08 12:15:31 -05:00
Artem Bilan
0a5fedcd7a Zip: Some deep cleanup and polishing
* Upgrade to Gradle-2.5, SI-4.2.4
* Remove redundant dependencies
* Add `slf4j-log4j12` to avoid log noise during testing
* Add `settings.gradle` to allow Artifactory Release Management
* Move XSD stuff to the proper place - `org\springframework\integration\zip\config`
* Get rid of manual `enum` transformation in the `Parser`:
  - we can't do that there because `property-placeholder` and SpEL are processed later
  - no reason to do that at all - `enum`s are properly converted by the SF during bean population phase
* Fix `UnZipTransformer` to `delete()` file in the `finally` block after closing the `InputStream` on file
2016-01-07 21:44:23 -05:00
Filippo Balicchia
f7b31228c2 INTEXT-215: Cassandra Namespace Support
JIRA: https://jira.spring.io/browse/INTEXT-215
2016-01-05 12:13:10 -05:00
Artem Bilan
2e9247711d INTEXT-195: Add XMPP Extension for Smack 4.1
JIRA: https://jira.spring.io/browse/INTEXT-195

Upgrade to Smack 4.1

Rework logic to the `XMPPConnection` interface

Refactoring for the `XmppConnectionFactoryBean` to extract `serviceName` from the `user`.

Remove redundant dependencies

Add `smack-java7` dependency and some other polishing after testing

Polishing
2015-10-28 17:16:14 -04:00
Artem Bilan
0867be2faf Upgrade to SI-4.2.0.RELEASE 2015-09-09 16:38:25 -04:00