Skip to content

Commit 01c2328

Browse files
Merge branch 'master' into SNOW-896818-private-key-decrypt
2 parents e0b1a9a + 61a3b1c commit 01c2328

File tree

64 files changed

+3520
-1095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3520
-1095
lines changed

.github/workflows/build-test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ on:
1818
required: true
1919
tags:
2020
description: "Test scenario tags"
21+
22+
concurrency:
23+
# older builds for the same pull request numer or branch should be cancelled
24+
cancel-in-progress: true
25+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
26+
2127
jobs:
2228
build:
2329
name: Build

CHANGELOG.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**JDBC Driver 3.15.1**
2+
3+
- \||Please Refer to Release Notes at https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc
4+
15
**JDBC Driver 3.15.0**
26

37
- \||Please Refer to Release Notes at https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc

FIPS/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.15.1-SNAPSHOT</version>
8+
<version>3.15.2-SNAPSHOT</version>
99
<relativePath>../parent-pom.xml</relativePath>
1010
</parent>
1111

1212
<artifactId>snowflake-jdbc-fips</artifactId>
13-
<version>3.15.1-SNAPSHOT</version>
13+
<version>3.15.2-SNAPSHOT</version>
1414
<packaging>jar</packaging>
1515

1616
<name>snowflake-jdbc-fips</name>

SECURITY.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Security Policy
2+
3+
4+
Please refer to the Snowflake [HackerOne program](https://hackerone.com/snowflake?type=team) for our security policies and for reporting any security vulnerabilities.
5+
6+
For other security related questions and concerns, please contact the Snowflake security team at [email protected]

parent-pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.15.1-SNAPSHOT</version>
8+
<version>3.15.2-SNAPSHOT</version>
99
<packaging>pom</packaging>
1010

1111
<modules>
@@ -64,7 +64,7 @@
6464
<metrics.version>2.2.0</metrics.version>
6565
<mockito.version>4.11.0</mockito.version>
6666
<netty.version>4.1.100.Final</netty.version>
67-
<nimbusds.version>9.21</nimbusds.version>
67+
<nimbusds.version>9.37.3</nimbusds.version>
6868
<opencensus.version>0.31.1</opencensus.version>
6969
<plexus.container.version>1.0-alpha-9-stable-1</plexus.container.version>
7070
<plexus.utils.version>3.4.2</plexus.utils.version>

pom.xml

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<parent>
77
<groupId>net.snowflake</groupId>
88
<artifactId>snowflake-jdbc-parent</artifactId>
9-
<version>3.15.1-SNAPSHOT</version>
9+
<version>3.15.2-SNAPSHOT</version>
1010
<relativePath>./parent-pom.xml</relativePath>
1111
</parent>
1212

1313
<!-- Maven complains about using property here, but it makes install and deploy process easier to override final package names and localization -->
1414
<artifactId>${artifactId}</artifactId>
15-
<version>3.15.1-SNAPSHOT</version>
15+
<version>3.15.2-SNAPSHOT</version>
1616
<packaging>jar</packaging>
1717

1818
<name>${artifactId}</name>
@@ -668,6 +668,10 @@
668668
<pattern>net.snowflake.common</pattern>
669669
<shadedPattern>${shadeBase}.snowflake.common</shadedPattern>
670670
</relocation>
671+
<relocation>
672+
<pattern>mozilla</pattern>
673+
<shadedPattern>${shadeBase}.mozilla</shadedPattern>
674+
</relocation>
671675
<relocation>
672676
<pattern>org.apache.arrow</pattern>
673677
<shadedPattern>${shadeBase}.apache.arrow</shadedPattern>
@@ -799,6 +803,10 @@
799803
<phase>package</phase>
800804
<configuration>
801805
<relocations>
806+
<relocation>
807+
<pattern>mozilla</pattern>
808+
<shadedPattern>${shadeBase}.mozilla</shadedPattern>
809+
</relocation>
802810
<relocation>
803811
<pattern>net.snowflake.common</pattern>
804812
<shadedPattern>${shadeBase}.snowflake.common</shadedPattern>

src/main/java/net/snowflake/client/config/SFClientConfigParser.java

+25-7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import java.io.IOException;
99
import java.nio.file.Files;
1010
import java.nio.file.Paths;
11+
import java.util.regex.Matcher;
12+
import java.util.regex.Pattern;
1113
import net.snowflake.client.jdbc.SnowflakeDriver;
1214
import net.snowflake.client.log.SFLogger;
1315
import net.snowflake.client.log.SFLoggerFactory;
@@ -85,20 +87,36 @@ public static String getConfigFilePathFromJDBCJarLocation() {
8587

8688
if (systemGetProperty("os.name") != null
8789
&& systemGetProperty("os.name").toLowerCase().startsWith("windows")) {
88-
// Path translation for windows
89-
if (updatedPath.startsWith("/")) {
90-
updatedPath = updatedPath.substring(1);
91-
} else if (updatedPath.startsWith("file:\\")) {
92-
updatedPath = updatedPath.substring(6);
93-
}
94-
updatedPath = updatedPath.replace("/", "\\");
90+
updatedPath = convertToWindowsPath(updatedPath);
9591
}
9692
return updatedPath;
9793
}
94+
9895
return "";
9996
} catch (Exception ex) {
10097
// return empty path and move to step 4 of loadSFClientConfig()
10198
return "";
10299
}
103100
}
101+
102+
static String convertToWindowsPath(String filePath) {
103+
// Find the Windows file path pattern: ex) C:\ or D:\
104+
Pattern windowsFilePattern = Pattern.compile("[C-Z]:[\\\\/]");
105+
Matcher matcher = windowsFilePattern.matcher(filePath);
106+
String prefix = "";
107+
108+
// Path translation for windows
109+
if (filePath.startsWith("/")) {
110+
filePath = filePath.substring(1);
111+
} else if (filePath.startsWith("file:\\")) {
112+
filePath = filePath.substring(6);
113+
} else if (filePath.startsWith("\\")) {
114+
filePath = filePath.substring(2);
115+
} else if (matcher.find() && matcher.start() != 0) {
116+
prefix = filePath.substring(0, matcher.start());
117+
filePath = filePath.substring(matcher.start());
118+
}
119+
filePath = prefix + filePath.replace("/", "\\");
120+
return filePath;
121+
}
104122
}

0 commit comments

Comments
 (0)