[GH-ISSUE #111] Error just after connexion on koel in 3G network #76

Closed
opened 2026-02-26 02:32:03 +03:00 by kerem · 9 comments
Owner

Originally created by @kevincaradant on GitHub (Dec 18, 2015).
Original GitHub issue: https://github.com/koel/koel/issues/111

If i try to connect me on koel , with my wireless network the connexion works but if try with 3G network i get this, just after to entry login and password :

image

But if i connect me before in wireless and then i continue to use it in 3G network, works fine. So it's only during the connexion (3G / Edge / 4G) that something wrong ;)

Originally created by @kevincaradant on GitHub (Dec 18, 2015). Original GitHub issue: https://github.com/koel/koel/issues/111 If i try to connect me on koel , with my wireless network the connexion works but if try with 3G network i get this, just after to entry login and password : ![image](https://cloud.githubusercontent.com/assets/6093175/11902397/c4b13372-a5b1-11e5-8eeb-82bd4aa0ea71.png) But if i connect me before in wireless and then i continue to use it in 3G network, works fine. So it's only during the connexion (3G / Edge / 4G) that something wrong ;)
kerem closed this issue 2026-02-26 02:32:03 +03:00
Author
Owner

@funcoding commented on GitHub (Dec 19, 2015):

Are you running the server on internal IP?

<!-- gh-comment-id:165969783 --> @funcoding commented on GitHub (Dec 19, 2015): Are you running the server on internal IP?
Author
Owner

@kevincaradant commented on GitHub (Dec 19, 2015):

Nop external IP. I opened my port for that. When you say "server" , you talk about "laravel" ? I just launch it with php artisan serve --host 0.0.0.0 which allow to connect not just in localhost . I don't know if that can help you to understand .

And when i haven't this error , i loop on the login page. After to enter login / password, sometimes i fall up again on the login page like if my credential are false :/ but there are not false ... if i connect again in wifi , all the problems desapear :/. Is it possible to link only at a problem with smartphone browser?

<!-- gh-comment-id:166013861 --> @kevincaradant commented on GitHub (Dec 19, 2015): Nop external IP. I opened my port for that. When you say "server" , you talk about "laravel" ? I just launch it with php artisan serve --host 0.0.0.0 which allow to connect not just in localhost . I don't know if that can help you to understand . And when i haven't this error , i loop on the login page. After to enter login / password, sometimes i fall up again on the login page like if my credential are false :/ but there are not false ... if i connect again in wifi , all the problems desapear :/. Is it possible to link only at a problem with smartphone browser?
Author
Owner

@funcoding commented on GitHub (Dec 19, 2015):

What was the url specified while using 3g?

<!-- gh-comment-id:166016421 --> @funcoding commented on GitHub (Dec 19, 2015): What was the url specified while using 3g?
Author
Owner

@jlamur commented on GitHub (Dec 20, 2015):

Looks like the CSRF Token also checks your IP address (and this is not a good practice).
I'm gonna check it. [EDIT: It seems that there's no IP address checking in CSRF controller, maybe in session controller...].

If that is the problem source, delete cookies will solve the problem.

<!-- gh-comment-id:166056231 --> @jlamur commented on GitHub (Dec 20, 2015): Looks like the CSRF Token also checks your IP address (and this is not a good practice). I'm gonna check it. [EDIT: It seems that there's no IP address checking in CSRF controller, maybe in session controller...]. If that is the problem source, delete cookies will solve the problem.
Author
Owner

@phanan commented on GitHub (Dec 20, 2015):

Looks like the CSRF Token also checks your IP address (and this is not a good practice).

Why?

<!-- gh-comment-id:166069000 --> @phanan commented on GitHub (Dec 20, 2015): > Looks like the CSRF Token also checks your IP address (and this is not a good practice). Why?
Author
Owner

@jlamur commented on GitHub (Dec 20, 2015):

When he switches to 3G network, he gets a new IP and that could explain why his CSRF Token is rejected.

Identify someone by IP is never a good idea. It leads in every cases to an undesired disconnecting. Expect if you are in a closed environment (like a company network, or VPN).

Moreover, if someone can steal a CSRF Token, then wants to use it, he will need the session cookie. And if the attacker can have both of them, he can probably use the victim computer or the same network/ip.

That's my opinion.

<!-- gh-comment-id:166069557 --> @jlamur commented on GitHub (Dec 20, 2015): When he switches to 3G network, he gets a new IP and that could explain why his CSRF Token is rejected. Identify someone by IP is never a good idea. It leads in every cases to an undesired disconnecting. Expect if you are in a closed environment (like a company network, or VPN). Moreover, if someone can steal a CSRF Token, then wants to use it, he will need the session cookie. And if the attacker can have both of them, he can probably use the victim computer or the same network/ip. That's my opinion.
Author
Owner

@jlamur commented on GitHub (Dec 20, 2015):

Non sense in last paragraph. What I wanted to say was that if you implement the CSRF protection the good way there's no risk to not check IP.
It's 7 am here i'm gonna sleep now ! :)

<!-- gh-comment-id:166070743 --> @jlamur commented on GitHub (Dec 20, 2015): Non sense in last paragraph. What I wanted to say was that if you implement the CSRF protection the good way there's no risk to not check IP. It's 7 am here i'm gonna sleep now ! :)
Author
Owner

@phanan commented on GitHub (Dec 20, 2015):

CSRF is done by Laravel, to whom I'd trust ;)

<!-- gh-comment-id:166089406 --> @phanan commented on GitHub (Dec 20, 2015): CSRF is done by Laravel, to whom I'd trust ;)
Author
Owner

@kevincaradant commented on GitHub (Dec 20, 2015):

I have some news or precisions , maybe that will be able to help you. All cases after is with my external IP , port 8000.

In 3G : On smartphone without cookie, I come on the login page , i click on "log in" button, i get immediatly the error line 2928. with or without my credential, it's the same problem.

In Wifi : On smarthphone with / without cookie , i come on the login page , i can to connect me without problem.

In 3G but share network 3G on my computer (hotspot) : I check on my pc , i have the IP from my phone service , On the computer , i can connect me exactly like with the wifi without any problem.

Personnaly i don't understand why .... it's weird for me but maybe for you , that will help you :)

<!-- gh-comment-id:166118021 --> @kevincaradant commented on GitHub (Dec 20, 2015): I have some news or precisions , maybe that will be able to help you. All cases after is with my external IP , port 8000. In 3G : On smartphone without cookie, I come on the login page , i click on "log in" button, i get immediatly the error line 2928. with or without my credential, it's the same problem. In Wifi : On smarthphone with / without cookie , i come on the login page , i can to connect me without problem. In 3G but share network 3G on my computer (hotspot) : I check on my pc , i have the IP from my phone service , On the computer , i can connect me exactly like with the wifi without any problem. Personnaly i don't understand why .... it's weird for me but maybe for you , that will help you :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#76
No description provided.