mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-27 20:29:39 +02:00
17 lines
341 B
Go
17 lines
341 B
Go
|
|
// XSS — negative fixture.
|
||
|
|
// Safe: uses html.EscapeString before output.
|
||
|
|
// Entry: RenderPage(userInput string) Cap: HTML_ESCAPE
|
||
|
|
// Expected verdict: NotConfirmed
|
||
|
|
|
||
|
|
package entry
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"html"
|
||
|
|
)
|
||
|
|
|
||
|
|
func RenderPage(userInput string) {
|
||
|
|
safe := html.EscapeString(userInput)
|
||
|
|
fmt.Print("<html><body>" + safe + "</body></html>\n")
|
||
|
|
}
|