Samples icon indicating copy to clipboard operation
Samples copied to clipboard

Calling SingalR\poll?transport=longpolling issue

Open Btotakura opened this issue 5 years ago • 4 comments

whenever we change the messageid of the above request we are getting the all the connections history means all the methods are coming as response.please see the attached image for your reference.

Fetch all details 2 (2)

Btotakura avatar Feb 13 '20 13:02 Btotakura

That's expected, the messageID is used by the client to tell the server which message it received last. So if you change the messageID to an older ID then you'll get messages since that older ID.

And the concern about auth is not valid because your connection is authenticated via the connectionToken in the query string.

Also, if that's real data you should probably reset the SessionTokens and Login IDs.

cc @halter73

BrennanConroy avatar Feb 13 '20 16:02 BrennanConroy

And the concern about auth is not valid because your connection is authenticated via the connectionToken in the query string.

Additionally, if the authenticated user has a non-empty Context.User.Identity.Name that IsAuthenticated when the SignalR connection is established, SignalR will verify every other request with that same connectionToken is authenticated with the same user name or else it will reject the request with a 403.

https://github.com/SignalR/SignalR/blob/d5a2dcb9e09ec97631a4f51b4dc7b75735277ca4/src/Microsoft.AspNet.SignalR.Core/PersistentConnection.cs#L339-L344

halter73 avatar Feb 13 '20 21:02 halter73

That's expected, the messageID is used by the client to tell the server which message it received last. So if you change the messageID to an older ID then you'll get messages since that older ID.

And the concern about auth is not valid because your connection is authenticated via the connectionToken in the query string.

Also, if that's real data you should probably reset the SessionTokens and Login IDs.

cc @halter73

is there any possibility to overcome this issue? please suggest me? if any code changes is needed i will try to do , please help on this?

Btotakura avatar Feb 17 '20 11:02 Btotakura

is there any possibility to overcome this issue?

What issue? You aren't leaking any data because the data has already been sent to this client before.

BrennanConroy avatar Feb 17 '20 16:02 BrennanConroy