Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't serve directories as static files (#11072) #11105

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

caalador
Copy link
Contributor

Add check to the resource to see
if it is a directory and do not serve
if this is the case.

Fixe #11047

Add check to the resource to see
if it is a directory and do not serve
if this is the case.

Fixe #11047
# Conflicts:
#	flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 7 issues

  1. CRITICAL StaticFileServer.java#L33: Remove this unused import 'java.util.ArrayList'. rule
  2. CRITICAL StaticFileServer.java#L35: Remove this unused import 'java.util.List'. rule
  3. MAJOR StaticFileServer.java#L143: Replace this with a call to the "toFile().isDirectory()" method rule
  4. MAJOR StaticFileServer.java#L151: Replace this with a call to the "toFile().isDirectory()" method rule
  5. MINOR StaticFileServer.java#L136: Move the "jar" string literal on the left side of this string comparison. rule
  6. MINOR StaticFileServer.java#L141: Put single-quotes around '!' to use the faster "lastIndexOf(char)" method. rule
  7. MINOR StaticFileServer.java#L150: Move the "file" string literal on the left side of this string comparison. rule

@denis-anisimov denis-anisimov merged commit 902a602 into 2.7 Jun 1, 2021
@denis-anisimov denis-anisimov deleted the cherry/cherrypick-11072-to-2.7 branch June 1, 2021 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants