Skip to content

Commit 2b51b42

Browse files
author
cokeBeer
committed
fix #9097
1 parent ef7363c commit 2b51b42

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

ql/lib/semmle/go/frameworks/Beego.qll

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@ private import semmle.go.security.SafeUrlFlowCustomizations
1212
* from the [Beego](https://github.com/beego/beego) package.
1313
*/
1414
module Beego {
15-
/** Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego`. */
16-
string modulePath() { result = ["github.com/astaxie/beego", "github.com/beego/beego"] }
15+
/**
16+
* Gets the module path `github.com/astaxie/beego` or `github.com/beego/beego`
17+
* or `github.com/beego/beego/v2/server/web`.
18+
*/
19+
string modulePath() {
20+
result =
21+
[
22+
"github.com/astaxie/beego", "github.com/beego/beego",
23+
"github.com/beego/beego/v2/server/web"
24+
]
25+
}
1726

1827
/** Gets the path for the root package of beego. */
1928
string packagePath() { result = package(modulePath(), "") }

ql/lib/semmle/go/frameworks/stdlib/NetHttp.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module NetHttp {
2929
UserControlledRequestField() {
3030
exists(string fieldName | this.getField().hasQualifiedName("net/http", "Request", fieldName) |
3131
fieldName =
32-
["Body", "GetBody", "Form", "PostForm", "MultipartForm", "Header", "Trailer", "URL"]
32+
["Body", "GetBody", "Form", "PostForm", "MultipartForm", "Header", "Trailer", "URL", "Host"]
3333
)
3434
}
3535
}

0 commit comments

Comments
 (0)