GeezerVison is showing github.com — improved language selector and add defaults for different languages · WebGoat/WebGoat@8996466
File treeExpand file treeCollapse file tree Open diff view settings java/org/owasp/webgoat/container securitymisconfiguration/i18n vulnerablecomponents/i18n
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: src/main/java/org/owasp/webgoat/container/i18n/PluginMessages.java +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,10 +31,16 @@ protected PropertiesHolder refreshProperties(String filename, PropertiesHolder p | 31 | 31 | Properties properties = new Properties(); | 32 | 32 | long lastModified = System.currentTimeMillis(); | 33 | 33 |
| | 34 | + // filename is passed by Spring as e.g. "WebGoatLabels" or "WebGoatLabels_nl". | | 35 | + // Strip any path prefix so we get just the bare file basename to use in the | | 36 | + // classpath glob, preserving the locale suffix (e.g. "_nl", "_de", "_fr"). | | 37 | + String fileBasename = | | 38 | + filename.contains("/") ? filename.substring(filename.lastIndexOf('/') + 1) : filename; | | 39 | + | 34 | 40 | try { | 35 | 41 | var resources = | 36 | 42 | resourcePatternResolver.getResources( | 37 | | - "classpath:/lessons/**/i18n" + "/WebGoatLabels" + PROPERTIES_SUFFIX); | | 43 | + "classpath:/lessons/**/i18n/" + fileBasename + PROPERTIES_SUFFIX); | 38 | 44 | for (var resource : resources) { | 39 | 45 | String sourcePath = resource.getURI().toString().replace(PROPERTIES_SUFFIX, ""); | 40 | 46 | PropertiesHolder holder = super.refreshProperties(sourcePath, propHolder); | |
Collapse file Copy file name to clipboardExpand all lines: src/main/java/org/owasp/webgoat/container/lessons/Category.java +13-13Lines changed: 13 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | import lombok.Getter; | 8 | 8 |
| 9 | 9 | public enum Category { | 10 | | - INTRODUCTION("Introduction"), | 11 | | - GENERAL("General"), | | 10 | + INTRODUCTION("category.introduction"), | | 11 | + GENERAL("category.general"), | 12 | 12 |
| 13 | | - A1("(A1) Broken Access Control"), | 14 | | - A2("(A2) Cryptographic Failures"), | 15 | | - A3("(A3) Injection"), | | 13 | + A1("category.a1"), | | 14 | + A2("category.a2"), | | 15 | + A3("category.a3"), | 16 | 16 |
| 17 | | - A5("(A5) Security Misconfiguration"), | 18 | | - A6("(A6) Vuln & Outdated Components"), | 19 | | - A7("(A7) Identity & Auth Failure"), | 20 | | - A8("(A8) Software & Data Integrity"), | 21 | | - A9("(A9) Security Logging Failures"), | 22 | | - A10("(A10) Server-side Request Forgery"), | | 17 | + A5("category.a5"), | | 18 | + A6("category.a6"), | | 19 | + A7("category.a7"), | | 20 | + A8("category.a8"), | | 21 | + A9("category.a9"), | | 22 | + A10("category.a10"), | 23 | 23 |
| 24 | | - CLIENT_SIDE("Client side"), | | 24 | + CLIENT_SIDE("category.client.side"), | 25 | 25 |
| 26 | | - CHALLENGE("Challenges"); | | 26 | + CHALLENGE("category.challenge"); | 27 | 27 |
| 28 | 28 | @Getter private String name; | 29 | 29 |
| |
Collapse file Copy file name to clipboardExpand all lines: src/main/java/org/owasp/webgoat/container/service/LabelService.java +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | import lombok.extern.slf4j.Slf4j; | 10 | 10 | import org.owasp.webgoat.container.i18n.Messages; | 11 | 11 | import org.owasp.webgoat.container.i18n.PluginMessages; | 12 | | -import org.springframework.http.HttpStatus; | | 12 | +import org.springframework.http.CacheControl; | 13 | 13 | import org.springframework.http.MediaType; | 14 | 14 | import org.springframework.http.ResponseEntity; | 15 | 15 | import org.springframework.web.bind.annotation.GetMapping; | @@ -34,6 +34,8 @@ public ResponseEntity<Properties> fetchLabels() { | 34 | 34 | var allProperties = new Properties(); | 35 | 35 | allProperties.putAll(messages.getMessages()); | 36 | 36 | allProperties.putAll(pluginMessages.getMessages()); | 37 | | - return new ResponseEntity<>(allProperties, HttpStatus.OK); | | 37 | + return ResponseEntity.ok() | | 38 | + .cacheControl(CacheControl.noStore()) | | 39 | + .body(allProperties); | 38 | 40 | } | 39 | 41 | } |
Collapse file Copy file name to clipboardExpand all lines: src/main/resources/i18n/messages.properties +13Lines changed: 13 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,6 +30,19 @@ register.new=or register yourself as a new user | 30 | 30 | sign.up=Sign up | 31 | 31 | register.title=Register | 32 | 32 | searchmenu=Search lesson | | 33 | +category.introduction=Introduction | | 34 | +category.general=General | | 35 | +category.a1=(A1) Broken Access Control | | 36 | +category.a2=(A2) Cryptographic Failures | | 37 | +category.a3=(A3) Injection | | 38 | +category.a5=(A5) Security Misconfiguration | | 39 | +category.a6=(A6) Vuln & Outdated Components | | 40 | +category.a7=(A7) Identity & Auth Failure | | 41 | +category.a8=(A8) Software & Data Integrity | | 42 | +category.a9=(A9) Security Logging Failures | | 43 | +category.a10=(A10) Server-side Request Forgery | | 44 | +category.client.side=Client side | | 45 | +category.challenge=Challenges | 33 | 46 |
| 34 | 47 |
| 35 | 48 | not.empty=This field is required. | |
Collapse file Copy file name to clipboardExpand all lines: src/main/resources/i18n/messages_de.properties +13Lines changed: 13 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,3 +12,16 @@ password=Passwort | 12 | 12 | password.confirm=Wiederhole Passwort | 13 | 13 | sign.up=Anmelden | 14 | 14 | register.title=Registrieren | | 15 | +category.introduction=Einf\u00fchrung | | 16 | +category.general=Allgemein | | 17 | +category.a1=(A1) Fehlerhafte Zugriffskontrolle | | 18 | +category.a2=(A2) Kryptografische Fehler | | 19 | +category.a3=(A3) Einschleusung | | 20 | +category.a5=(A5) Sicherheitsfehlkonfiguration | | 21 | +category.a6=(A6) Veraltete Komponenten | | 22 | +category.a7=(A7) Authentifizierungsfehler | | 23 | +category.a8=(A8) Daten- und Softwareintegrit\u00e4t | | 24 | +category.a9=(A9) Unzureichendes Logging | | 25 | +category.a10=(A10) Serverseitige Anfragef\u00e4lschung | | 26 | +category.client.side=Clientseitig | | 27 | +category.challenge=Herausforderungen |
Collapse file Copy file name to clipboardExpand all lines: src/main/resources/i18n/messages_fr.properties +13Lines changed: 13 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,3 +4,16 @@ SolutionVideos=Solution vid\u00e9os | 4 | 4 | ErrorGenerating=Error generating | 5 | 5 | InvalidData=Donn\u00e9e invalide | 6 | 6 | Go!=Allez le faire! | | 7 | +category.introduction=Introduction | | 8 | +category.general=G\u00e9n\u00e9ral | | 9 | +category.a1=(A1) Contr\u00f4le d'acc\u00e8s d\u00e9faillant | | 10 | +category.a2=(A2) D\u00e9faillances cryptographiques | | 11 | +category.a3=(A3) Injection | | 12 | +category.a5=(A5) Mauvaise configuration de s\u00e9curit\u00e9 | | 13 | +category.a6=(A6) Composants vuln\u00e9rables et obsol\u00e8tes | | 14 | +category.a7=(A7) D\u00e9faillances d'authentification | | 15 | +category.a8=(A8) Int\u00e9grit\u00e9 des logiciels et des donn\u00e9es | | 16 | +category.a9=(A9) Journalisation insuffisante | | 17 | +category.a10=(A10) Falsification de requ\u00eate c\u00f4t\u00e9 serveur | | 18 | +category.client.side=C\u00f4t\u00e9 client | | 19 | +category.challenge=D\u00e9fis |
Collapse file Copy file name to clipboardExpand all lines: src/main/resources/i18n/messages_nl.properties +13Lines changed: 13 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,6 +26,19 @@ lesson.overview=Overzicht les | 26 | 26 | reset.lesson=Herstart les | 27 | 27 | sign.in=Inloggen | 28 | 28 | terms.agree=Ik ga akkoord met de voorwaarden | | 29 | +category.introduction=Introductie | | 30 | +category.general=Algemeen | | 31 | +category.a1=(A1) Gebroken Toegangsbeheer | | 32 | +category.a2=(A2) Cryptografische Fouten | | 33 | +category.a3=(A3) Injectie | | 34 | +category.a5=(A5) Beveiligingsfout | | 35 | +category.a6=(A6) Kwetsbare & Verouderde Componenten | | 36 | +category.a7=(A7) Identiteits- & Authenticatieproblemen | | 37 | +category.a8=(A8) Software & Data-integriteit | | 38 | +category.a9=(A9) Tekortkomingen in Logging | | 39 | +category.a10=(A10) Serversijdige Request Vervalsing | | 40 | +category.client.side=Client-kant | | 41 | +category.challenge=Uitdagingen | 29 | 42 | sign.up=Registreer | 30 | 43 | register.title=Aanmelden als nieuwe gebruiker | 31 | 44 | register.new=of aanmelden als nieuwe gebruiker | |
Collapse file Copy file name to clipboard +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +auth-bypass.title=Authentifizierungsumgehung |
Collapse file Copy file name to clipboard +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +auth-bypass.title=Contournement d'authentification |
Collapse file Copy file name to clipboard +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +auth-bypass.title=Authenticatie omzeilen |
|