Skip to content

Commit 2ac1234

Browse files
Potential fix for code scanning alert no. 2: Use of externally-controlled format string
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent c689fd8 commit 2ac1234

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kontrakt/src/main/java/no/nav/ung/sak/kontrakt/dokument/DokumentDto.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public int hashCode() {
122122

123123
void genererLenke() {
124124
if (journalpostId != null && journalpostId.getVerdi() != null && dokumentId != null) {
125-
this.href = String.format(basePath, journalpostId.getVerdi(), dokumentId);
125+
this.href = String.format("%s", basePath) + String.format("%s/%s", journalpostId.getVerdi(), dokumentId);
126126
}
127127
}
128128
}

0 commit comments

Comments
 (0)