Skip to content

Commit 52007fb

Browse files
committed
Change v3 to v2
1 parent 08c5476 commit 52007fb

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

go/ql/src/experimental/CWE-287/ImproperLdapAuth.qll

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,6 @@ private class GoLdapBindSink extends LdapAuthSink {
3232
}
3333
}
3434

35-
/**
36-
* A vulnerable argument to `go-ldap` or `ldap`'s `UnauthenticatedBind` function (Only v3).
37-
*/
38-
private class GoLdapAnonymousBindSink extends LdapAuthSink {
39-
GoLdapAnonymousBindSink() {
40-
exists(Method meth, string base, string t, string m |
41-
t = ["Conn"] and
42-
meth.hasQualifiedName([
43-
"github.com/go-ldap/ldap", "github.com/go-ldap/ldap/v3", "gopkg.in/ldap.v3"
44-
], t, m) and
45-
this = meth.getACall().getArgument(0)
46-
|
47-
base = ["UnauthenticatedBind"] and m = base
48-
)
49-
}
50-
}
51-
5235
/**
5336
* A call to a regexp match function, considered as a barrier guard for sanitizing untrusted URLs.
5437
*

go/ql/test/experimental/CWE-287/ImproperLdapAuth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"regexp"
88

9-
ldap "github.com/go-ldap/ldap/v3"
9+
ldap "gopkg.in/ldap.v2"
1010
)
1111

1212
func bad(w http.ResponseWriter, req *http.Request) (interface{}, error) {

0 commit comments

Comments
 (0)