You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After loading a page, the socket sends a message with a "phx_join" event. If, using plain JavaScript (Inspect Element), I resend the "phx_join" while modifying the "url" to a non-existent route, the execution reaches my LiveView file without passing through my "on_mount" defined in the route.
As a consequence, I no longer have the initial assigns of the application (e.g., company, profile), causing an error due to missing keys in the assigns.
Is this expected behavior? Is there anything I can do to prevent these kinds of errors?
Note: I am receiving such errors from bots.
Expected behavior
Maybe if every "phx_join" event went through the routes (on_mount) again, this issue would be resolved.
The text was updated successfully, but these errors were encountered:
Just to make sure, you're seeing bots sending fake phx_join messages over websocket with non existent URL parameter?
Can you post the exact errors you're seeing? To get to a LV mount, the bot would need to also send the correct session parameter, which seems very unlikely.
Environment
Actual behavior
After loading a page, the socket sends a message with a "phx_join" event. If, using plain JavaScript (Inspect Element), I resend the "phx_join" while modifying the "url" to a non-existent route, the execution reaches my LiveView file without passing through my "on_mount" defined in the route.
As a consequence, I no longer have the initial assigns of the application (e.g., company, profile), causing an error due to missing keys in the assigns.
Is this expected behavior? Is there anything I can do to prevent these kinds of errors?
Note: I am receiving such errors from bots.
Expected behavior
Maybe if every "phx_join" event went through the routes (on_mount) again, this issue would be resolved.
The text was updated successfully, but these errors were encountered: