@@ -12,20 +12,39 @@ private import semmle.go.security.SafeUrlFlowCustomizations
12
12
* from the [Beego](https://github.com/beego/beego) package.
13
13
*/
14
14
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
+ /** Gets the v1 module path `github.com/astaxie/beego` or `github.com/beego/beego`. */
16
+ string v1modulePath ( ) { result = [ "github.com/astaxie/beego" , "github.com/beego/beego" ] }
17
+
18
+ /** Gets the v2 module path `github.com/beego/beego/v2` */
19
+ string v2modulePath ( ) { result = "github.com/beego/beego/v2" }
17
20
18
21
/** Gets the path for the root package of beego. */
19
- string packagePath ( ) { result = package ( modulePath ( ) , "" ) }
22
+ string packagePath ( ) {
23
+ result = package ( v1modulePath ( ) , "" )
24
+ or
25
+ result = package ( v2modulePath ( ) , "server/web" )
26
+ }
20
27
21
28
/** Gets the path for the context package of beego. */
22
- string contextPackagePath ( ) { result = package ( modulePath ( ) , "context" ) }
29
+ string contextPackagePath ( ) {
30
+ result = package ( v1modulePath ( ) , "context" )
31
+ or
32
+ result = package ( v2modulePath ( ) , "server/web/context" )
33
+ }
23
34
24
35
/** Gets the path for the logs package of beego. */
25
- string logsPackagePath ( ) { result = package ( modulePath ( ) , "logs" ) }
36
+ string logsPackagePath ( ) {
37
+ result = package ( v1modulePath ( ) , "logs" )
38
+ or
39
+ result = package ( v2modulePath ( ) , "core/logs" )
40
+ }
26
41
27
42
/** Gets the path for the utils package of beego. */
28
- string utilsPackagePath ( ) { result = package ( modulePath ( ) , "utils" ) }
43
+ string utilsPackagePath ( ) {
44
+ result = package ( v1modulePath ( ) , "utils" )
45
+ or
46
+ result = package ( v2modulePath ( ) , "core/utils" )
47
+ }
29
48
30
49
/**
31
50
* `BeegoInput` sources of untrusted data.
0 commit comments