Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
8f39ebf7
Commit
8f39ebf7
authored
Nov 04, 2020
by
Scott Frederick
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x'
Closes gh-24043
parents
bb5faeaa
62aa1b7a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
4 deletions
+4
-4
ConfigFileApplicationListener.java
...rk/boot/context/config/ConfigFileApplicationListener.java
+1
-1
LocationResourceLoader.java
...framework/boot/context/config/LocationResourceLoader.java
+1
-1
ConfigTreePropertySource.java
...rg/springframework/boot/env/ConfigTreePropertySource.java
+1
-1
LocationResourceLoaderTests.java
...work/boot/context/config/LocationResourceLoaderTests.java
+1
-1
testproperties.properties
.../test/resources/config/..hidden/testproperties.properties
+0
-0
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
View file @
8f39ebf7
...
...
@@ -554,7 +554,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
private
boolean
hasHiddenPathElement
(
Resource
resource
)
throws
IOException
{
String
cleanPath
=
StringUtils
.
cleanPath
(
resource
.
getFile
().
getAbsolutePath
());
for
(
Path
value
:
Paths
.
get
(
cleanPath
))
{
if
(
value
.
toString
().
startsWith
(
"."
))
{
if
(
value
.
toString
().
startsWith
(
".
.
"
))
{
return
true
;
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/LocationResourceLoader.java
View file @
8f39ebf7
...
...
@@ -144,7 +144,7 @@ class LocationResourceLoader {
}
private
boolean
isVisibleDirectory
(
File
file
)
{
return
file
.
isDirectory
()
&&
!
file
.
getName
().
startsWith
(
"."
);
return
file
.
isDirectory
()
&&
!
file
.
getName
().
startsWith
(
".
.
"
);
}
/**
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/ConfigTreePropertySource.java
View file @
8f39ebf7
...
...
@@ -226,7 +226,7 @@ public class ConfigTreePropertySource extends EnumerablePropertySource<Path> imp
private
static
boolean
hasHiddenPathElement
(
Path
path
)
{
Iterator
<
Path
>
iterator
=
path
.
iterator
();
while
(
iterator
.
hasNext
())
{
if
(
iterator
.
next
().
toString
().
startsWith
(
"."
))
{
if
(
iterator
.
next
().
toString
().
startsWith
(
".
.
"
))
{
return
true
;
}
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/LocationResourceLoaderTests.java
View file @
8f39ebf7
...
...
@@ -129,7 +129,7 @@ class LocationResourceLoaderTests {
@Test
void
getResourcesWhenHasHiddenDirectoriesFiltersResults
()
throws
IOException
{
createTree
();
File
hiddenDirectory
=
new
File
(
this
.
temp
,
".a"
);
File
hiddenDirectory
=
new
File
(
this
.
temp
,
".
.
a"
);
hiddenDirectory
.
mkdirs
();
FileCopyUtils
.
copy
(
"h"
.
getBytes
(),
new
File
(
hiddenDirectory
,
"file"
));
Resource
[]
resources
=
this
.
loader
.
getResources
(
this
.
temp
.
getAbsolutePath
()
+
"/*/file"
,
ResourceType
.
FILE
);
...
...
spring-boot-project/spring-boot/src/test/resources/config/.hidden/testproperties.properties
→
spring-boot-project/spring-boot/src/test/resources/config/.
.
hidden/testproperties.properties
View file @
8f39ebf7
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment