Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

make sure etag is a string for GET room_keys/version #7691

Merged
merged 4 commits into from
Jun 15, 2020
Merged

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Jun 12, 2020

Thanks to sorunome for noticing.

The spec says that etag should be a string, but it's stored in the DB as an int, so we need to convert it before we return it.

@uhoreg
Copy link
Member Author

uhoreg commented Jun 12, 2020

Uhm... Someone broke CI...

/me throws it in the review queue and slowly walks away

@uhoreg uhoreg requested a review from a team June 12, 2020 18:47
changelog.d/7691.bugfix Outdated Show resolved Hide resolved
@clokep
Copy link
Member

clokep commented Jun 12, 2020

Note that the broken build is from a busted virtualenv release. Seems like they're fixing it.

@clokep clokep requested a review from a team June 12, 2020 18:58
@@ -351,6 +351,7 @@ def get_version_info(self, user_id, version=None):
raise

res["count"] = yield self.store.count_e2e_room_keys(user_id, res["version"])
res["etag"] = str(res["etag"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked briefly on Friday and this matches the other places we call get_e2e_room_keys_version_info.

@clokep clokep merged commit 2b23446 into develop Jun 15, 2020
@clokep clokep deleted the uhoreg/fix_etag branch June 15, 2020 17:42
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '03619324f':
  Create a ListenerConfig object (#7681)
  Fix changelog wording
  1.15.1
  Wrap register_device coroutine in an ensureDeferred (#7684)
  Ensure the body is a string before comparing push rules. (#7701)
  Ensure etag is a string for GET room_keys/version response (#7691)
  Update m.id.phone to use 'phone' instead of 'number' (#7687)
  Fix "There was no active span when trying to log." error (#7698)
  Enable 3PID add/bind/unbind endpoints on r0 routes
  Discard RDATA from already seen positions. (#7648)
  Replace iteritems/itervalues/iterkeys with native versions. (#7692)
  Fix warnings about losing log context during UI auth. (#7688)
  Fix a typo when comparing the URI & method during UI Auth. (#7689)
  Remove "user_id" from GET /presence. (#7606)
  Increase the default SAML session expirary time to 15 minutes. (#7664)
  fix typo in sample_config.yaml (#7652)
  Take out a lock before modifying _CACHES (#7663)
  Add option to enable encryption by default for new rooms (#7639)
  Clean-up the fallback login code. (#7657)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants