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

Security : remove access token in request query param #116

Open
laurent-treeb opened this issue Jan 20, 2022 · 1 comment
Open

Security : remove access token in request query param #116

laurent-treeb opened this issue Jan 20, 2022 · 1 comment

Comments

@laurent-treeb
Copy link

method, path = Api.whoami(access_token)

The access_token is thrown to server Synapse in query param when a call to Api.whoami is done.
For security reasons => must be thrown in Authorization header instead.

@laurent-treeb
Copy link
Author

Replacement code:

                method = "GET"
                path = Api._build_path(path=["account", "whoami"])
                headers = [("Authorization", f"Bearer {access_token}")]

                resp = await session.request(
                    method,
                    self.homeserver_url + path,
                    proxy=self.proxy,
                    ssl=self.ssl,
                    headers=headers,
                )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant