File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
main/kotlin/com/reposilite/frontend
test/kotlin/com/reposilite/storage Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import org.intellij.lang.annotations.Language
2121object NotFoundTemplate {
2222
2323 private val uriFormatter = Regex (" /+" ) // exclude common typos from URI
24- private val regexAntiXss = Regex (" [^A-Za-z0-9/.\\ - ]" ) // exclude custom non-standard characters from template
24+ private val regexAntiXss = Regex (" [^A-Za-z0-9/.\\ -_ ]" ) // exclude custom non-standard characters from template
2525
2626 fun createNotFoundPage (basePath : String , originUri : String , details : String ): String {
2727 val uri = originUri.replace(uriFormatter, " /" )
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class LocationTest {
3030 assertThat(Location .of(" /group" ).resolve(" /artifact" ).toString()).isEqualTo(" group/artifact" )
3131 assertThat(Location .of(" /////group/////" ).resolve(" /////artifact/////" ).toString()).isEqualTo(" group/artifact" )
3232 assertThat(Location .of(" \\\\\\ group\\\\\\ " ).resolve(" \\\\\\ artifact\\\\\\ " ).toString()).isEqualTo(" group/artifact" )
33+ assertThat(Location .of(" .abc" ).resolve(" _cdf.efg" ).toString()).isEqualTo(" .abc/_cdf.efg" )
3334 assertThat(Location .of(" 시험" ).resolve(" 기준" ).toString()).isEqualTo(" 시험/기준" )
3435 }
3536
You can’t perform that action at this time.
0 commit comments