if parse script to redir, then return no auth

This commit is contained in:
Bel LaPointe
2022-01-27 15:37:58 -07:00
parent 0ab4b795bd
commit d7339c855e

View File

@@ -158,6 +158,9 @@ func (fe FastExact) parse(resp *http.Response) ([]Job, error) {
}
b, _ = ioutil.ReadAll(gzip)
}
if bytes.Contains(b, []byte(`<script>window.location.href='index.php'</script>`)) {
return nil, ErrNoAuth
}
logtr.Verbosef("fe.parse %s", b)
resp.Body = io.NopCloser(bytes.NewReader(b))
doc, err := goquery.NewDocumentFromReader(resp.Body)