Skip to content

Commit 2bbd9ab

Browse files
committed
Change definition of BeegoInputSafeUrlSource
1 parent 8d8af32 commit 2bbd9ab

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ module Beego {
6969
)
7070
)
7171
}
72-
73-
predicate isSafeUrlSource() { methodName in ["URI", "URL"] }
7472
}
7573

7674
/** `BeegoInput` sources that are safe to use for redirection. */
7775
private class BeegoInputSafeUrlSource extends SafeUrlFlow::Source {
78-
BeegoInputSafeUrlSource() { this.(BeegoInputSource).isSafeUrlSource() }
76+
BeegoInputSafeUrlSource() {
77+
exists(Method m | m.hasQualifiedName(contextPackagePath(), "BeegoInput", ["URI", "URL"]) |
78+
this = m.getACall().getResult(0)
79+
)
80+
}
7981
}
8082

8183
/**

0 commit comments

Comments
 (0)