Skip to content
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

Add support for X-Super-Properties #17

Closed
nakoyasha opened this issue May 9, 2024 · 2 comments · Fixed by #25
Closed

Add support for X-Super-Properties #17

nakoyasha opened this issue May 9, 2024 · 2 comments · Fixed by #25
Labels
enhancement New feature or request

Comments

@nakoyasha
Copy link

X-Super-Properties is a base64-encoded JSON header that identifies the client by letting the server know it's build number, release channel, etc
It might be a good idea to support it as Discord might otherwise flag accounts for sending user-api requests without it (as some features rely on it being there)
Example:

{
  "os": "Windows",
  "browser": "Chrome",
  "device": "",
  "system_locale": "en-US",
  "browser_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
  "browser_version": "124.0.0.0",
  "os_version": "10",
  "referrer": "",
  "referring_domain": "",
  "referrer_current": "",
  "referring_domain_current": "",
  "release_channel": "canary",
  "client_build_number": 291821,
  "client_event_source": null,
  "design_id": 0
}

More info about the header is documented here!

@iProgramMC
Copy link
Contributor

iProgramMC commented May 10, 2024

What features rely on it being there?

Anyway, I've made the change in a PR: #25. What do you think?
I'm just hoping it doesn't have the opposite effect of triggering antispam because we're trying to imitate a web client.

@iProgramMC iProgramMC added the enhancement New feature or request label May 10, 2024
@nakoyasha
Copy link
Author

What features rely on it being there?

Okay, I shouldn't have mentioned it since it's mostly just experimental features that rely on it (e.g, some experiments (aka, discord's implementation of a/b testing) will only be sent to the client if it's build_number is higher/is 269579)

I'm just hoping it doesn't have the opposite effect of triggering antispam because we're trying to imitate a web client.

It shouldn't! although it might be a good idea to update it every so often - Discord might find it suspicious that there's a big number of users with a really old build_number for example - but I don't think there's been any documented cases of that happening yet

Anyway, I've made the change in a PR: #25. What do you think?

For now, I think it's good! The only issue I have is the one I've mentioned above (client config with an outdated build_number), although I think it would be pretty hard to automate, so it's out of scope for the PR imo

iProgramMC added a commit that referenced this issue May 25, 2024
iProgramMC added a commit that referenced this issue May 25, 2024
iProgramMC added a commit that referenced this issue Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants