Skip to content

Force LBP PSP to receive OK from certain endpoints - #1147

Open
Toastbrot236 wants to merge 17 commits into
LittleBigRefresh:mainfrom
Toastbrot236:thank-you-psp-smh
Open

Toastbrot236 wants to merge 17 commits into
LittleBigRefresh:mainfrom
Toastbrot236:thank-you-psp-smh

Conversation

@Toastbrot236

Copy link
Copy Markdown
Contributor

This forces certain endpoint methods to always return OK to LBP PSP, even if the actual response status is not OK, to not cause the client to abort login or softlock itself. The endpoints I modified for this are:

  • Grief report uploads
  • Score uploads
  • Play uploads
  • Level star rating uploads
  • Level tag uploads

Also, I added unit tests to ensure that both these and the level/user hearting endpoints do always return OK to PSP. I initially wanted to use a Service for this which would overwrite the response data in ListenerContext, but it turns out that Bunkum, for some reason, only writes the endpoint method response there after calling Service.AfterRequestHandled(), so I just modified the endpoint methods in the end. This means that non-OK responses from services (e.g. rate-limits and auth failures) will still be returned to PSP, but I hope that won't be an issue, and I don't consider this to be important enough to put more effort into.

@Toastbrot236

Copy link
Copy Markdown
Contributor Author

I noticed that RoleService might still be a problem. That should be taken care of in a separate PR though, to not make this one too large, but an idea to handle that might be to use an attribute after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant