-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
www.jackpotcitycasino1.com: redirect loop with websteps #1792
Comments
This is the most immediate fix to the issue described by ooni/probe#1792. So, the logic was actually miss the increment, which would have been noticed with proper unit testing. Anyway, I am not sure why the loop ensues in the first time. By looking at the headers, it seems we're passing the headers correctly. So, even though this fix interrupts the loop, it still remains the question of whether the loop is legit or whether we're missing extra logic to properly redirect.
This is the most immediate fix to the issue described by ooni/probe#1792. So, the logic was actually miss the increment, which would have been noticed with proper unit testing. Anyway, I am not sure why the loop ensues in the first time. By looking at the headers, it seems we're passing the headers correctly. So, even though this fix interrupts the loop, it still remains the question of whether the loop is legit or whether we're missing extra logic to properly redirect.
This is the most immediate fix to the issue described by ooni/probe#1792. So, the logic was actually miss the increment, which would have been noticed with proper unit testing. Anyway, I am not sure why the loop ensues in the first time. By looking at the headers, it seems we're passing the headers correctly. So, even though this fix interrupts the loop, it still remains the question of whether the loop is legit or whether we're missing extra logic to properly redirect.
So, we clearly need to have tests for the code following redirections that take cookies into account. When we have these tests, than we can consider this redirection episode closer. Here's an initial attempt: package main
import (
"net/http"
"time"
)
func handler(w http.ResponseWriter, req *http.Request) {
cookie, err := req.Cookie("visited")
if err != nil || cookie.Value != "1" {
w.Header().Add("Location", "/")
http.SetCookie(w, &http.Cookie{
Name: "visited",
Value: "1",
Expires: time.Now().Add(60 * time.Minute),
})
w.WriteHeader(302)
return
}
w.Write([]byte("Welcome, guest\n"))
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
} The existing code works fine with this simple redirection. Now I wonder why. Need to investigate more in depth. |
So, the insight is that the
Compare to:
Now, let's remove
Let's now use the same
(From my vantage point I cannot say what Web Connectivity would do in this case, because that website is censored in Italy -- and this is why I need to use the |
This is the most immediate fix to the issue described by ooni/probe#1792. So, the logic was actually miss the increment, which would have been noticed with proper unit testing. Anyway, I am not sure why the loop ensues in the first time. By looking at the headers, it seems we're passing the headers correctly. So, even though this fix interrupts the loop, it still remains the question of whether the loop is legit or whether we're missing extra logic to properly redirect.
I have been running
./miniooni -n websteps
for quite some time and now I noticed it was stuck in a redirect loop with the https://www.jackpotcitycasino1.com/ URL. I am going to investigate either today or soon.The text was updated successfully, but these errors were encountered: