Compare commits

...

1 Commits

Author SHA1 Message Date
Bel LaPointe
d7339c855e if parse script to redir, then return no auth 2022-01-27 15:37:58 -07:00

View File

@@ -158,6 +158,9 @@ func (fe FastExact) parse(resp *http.Response) ([]Job, error) {
} }
b, _ = ioutil.ReadAll(gzip) 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) logtr.Verbosef("fe.parse %s", b)
resp.Body = io.NopCloser(bytes.NewReader(b)) resp.Body = io.NopCloser(bytes.NewReader(b))
doc, err := goquery.NewDocumentFromReader(resp.Body) doc, err := goquery.NewDocumentFromReader(resp.Body)