embulk-output-sftp 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51708045da5829301daa1d1d816688c262b6e932
4
- data.tar.gz: 3fedac6d7f98845a1278beaba39de3cfd0722ff4
3
+ metadata.gz: c56a0584cf221cab6a3e4caf8f5f6b7fd8c73750
4
+ data.tar.gz: 9a54d758d53715b2dd6b13ecebbea1306e92ea1d
5
5
  SHA512:
6
- metadata.gz: de3417dd58045d5c8bccc8b78896f1134bb320c0637207599ac974dec2032cb1a609244d95066008199f37194129c3fbe5d2d1b1dcd07a7996717669b08aa3c2
7
- data.tar.gz: 8e4ca5ae5bc7fddc25ba4a1bdd26e29a2dd07488477ee5f166592bb8fc957276b669c5fd0b158a98c1f084de9cd87c45a50c806c644c306a9a018b121ff90c33
6
+ metadata.gz: 10749e577ff285cc6cce4254517f712925e637e959cddcefce74dd086cb54605c675bc272270b50d5291cd8dc36a307dab205dbcba65aaeb1a29814b9b3ad63b
7
+ data.tar.gz: 9991eb85333675b381725365232947f628862a6e9430e912f3eeeee0d3e6d76e31db40a92fd7b7856706378c049c5b99ace8617980181fa6ec3bd1fc5b6963e9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ 0.1.10 (2018-05-07)
2
+ - Fix: Use java.util.regex.Pattern for host name validation
3
+ - https://github.com/embulk/embulk-output-sftp/pull/49
1
4
  0.1.9 (2018-04-26)
2
5
  - Enhance: Add validation for "host" and "proxy.host"
3
6
  - https://github.com/embulk/embulk-output-sftp/pull/48
data/build.gradle CHANGED
@@ -17,7 +17,7 @@ configurations {
17
17
  }
18
18
 
19
19
  group = "org.embulk.output.sftp"
20
- version = "0.1.9"
20
+ version = "0.1.10"
21
21
  sourceCompatibility = 1.7
22
22
  targetCompatibility = 1.7
23
23
 
@@ -22,6 +22,7 @@ import java.io.IOException;
22
22
  import java.io.InputStream;
23
23
  import java.net.URI;
24
24
  import java.net.URISyntaxException;
25
+ import java.util.regex.Pattern;
25
26
 
26
27
  import static org.embulk.output.sftp.SftpFileOutputPlugin.PluginTask;
27
28
  import static org.embulk.spi.util.RetryExecutor.retryExecutor;
@@ -271,13 +272,14 @@ public class SftpUtils
271
272
 
272
273
  public void validateHost(PluginTask task)
273
274
  {
274
- if (task.getHost().contains("%s")) {
275
+ Pattern pattern = Pattern.compile("\\s");
276
+ if (pattern.matcher(task.getHost()).find()) {
275
277
  throw new ConfigException("'host' can't contain spaces");
276
278
  }
277
279
  getSftpFileUri("/");
278
280
 
279
281
  if (task.getProxy().isPresent() && task.getProxy().get().getHost().isPresent()) {
280
- if (task.getProxy().get().getHost().get().contains("%s")) {
282
+ if (pattern.matcher(task.getProxy().get().getHost().get()).find()) {
281
283
  throw new ConfigException("'proxy.host' can't contains spaces");
282
284
  }
283
285
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-sftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Civitaspo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-04-26 00:00:00.000000000 Z
12
+ date: 2018-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -78,7 +78,7 @@ files:
78
78
  - classpath/commons-io-2.6.jar
79
79
  - classpath/commons-logging-1.2.jar
80
80
  - classpath/commons-vfs2-2.2.jar
81
- - classpath/embulk-output-sftp-0.1.9.jar
81
+ - classpath/embulk-output-sftp-0.1.10.jar
82
82
  - classpath/jsch-0.1.54.jar
83
83
  homepage: https://github.com/embulk/embulk-output-sftp
84
84
  licenses: