matrix-synapse 1.141.0rc1__cp39-abi3-macosx_11_0_arm64.whl → 1.141.0rc2__cp39-abi3-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of matrix-synapse might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: matrix-synapse
3
- Version: 1.141.0rc1
3
+ Version: 1.141.0rc2
4
4
  Summary: Homeserver for the Matrix decentralised comms protocol
5
5
  License: AGPL-3.0-or-later OR LicenseRef-Element-Commercial
6
6
  Author: Matrix.org Team and Contributors
@@ -1,10 +1,10 @@
1
- matrix_synapse-1.141.0rc1.dist-info/RECORD,,
2
- matrix_synapse-1.141.0rc1.dist-info/LICENSE-AGPL-3.0,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
3
- matrix_synapse-1.141.0rc1.dist-info/LICENSE-COMMERCIAL,sha256=EZfebSnFA3xtm1w2B9cuqpC1BF8tYjQA6HCCX9z3Zm4,255
4
- matrix_synapse-1.141.0rc1.dist-info/WHEEL,sha256=scg0IzB77chy-_40STvfbf7iGhX6kulz7EDsXzX0T_8,132
5
- matrix_synapse-1.141.0rc1.dist-info/entry_points.txt,sha256=Xf4Z-Sp4lk8P9pbRhSD40XrhhkooqYWm1OtxUlPwPgs,709
6
- matrix_synapse-1.141.0rc1.dist-info/AUTHORS.rst,sha256=KvPRmsv8L-ZN9AA51KsR-4fZu0ajfkCbSNNH9rhRUO4,1611
7
- matrix_synapse-1.141.0rc1.dist-info/METADATA,sha256=pxJtdnCUBZLV1lw3Xfdjd5Bl8etqURcHTEfKrIxjD7s,17005
1
+ matrix_synapse-1.141.0rc2.dist-info/RECORD,,
2
+ matrix_synapse-1.141.0rc2.dist-info/LICENSE-AGPL-3.0,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
3
+ matrix_synapse-1.141.0rc2.dist-info/LICENSE-COMMERCIAL,sha256=EZfebSnFA3xtm1w2B9cuqpC1BF8tYjQA6HCCX9z3Zm4,255
4
+ matrix_synapse-1.141.0rc2.dist-info/WHEEL,sha256=scg0IzB77chy-_40STvfbf7iGhX6kulz7EDsXzX0T_8,132
5
+ matrix_synapse-1.141.0rc2.dist-info/entry_points.txt,sha256=Xf4Z-Sp4lk8P9pbRhSD40XrhhkooqYWm1OtxUlPwPgs,709
6
+ matrix_synapse-1.141.0rc2.dist-info/AUTHORS.rst,sha256=KvPRmsv8L-ZN9AA51KsR-4fZu0ajfkCbSNNH9rhRUO4,1611
7
+ matrix_synapse-1.141.0rc2.dist-info/METADATA,sha256=3cIxSPUcTj5AgpZRyjRGEy4ijsmdkequvwO5-bc2ddw,17005
8
8
  synapse/server.py,sha256=3JfefqrjLSeX7Gv8ZA9E103E4O6l05uDkfIghkAfNxg,45069
9
9
  synapse/synapse_rust.abi3.so,sha256=c8Hr_z19BOOySFjzivUlQep5buKDZv-KOxKpsEVZsmg,10483184
10
10
  synapse/event_auth.py,sha256=fTm9uAf2iC6bIJuP7QH_7zz26VrqPLIqsoXKXkGINME,47090
@@ -206,7 +206,7 @@ synapse/_scripts/move_remote_media_to_new_store.py,sha256=VOGFBrZM3qBW4ysmdD8XW9
206
206
  synapse/_scripts/export_signing_key.py,sha256=i-7-vXYNpWRUvPJZNGcWgZ78pVNtHcd-j5VKI8JP9wk,2831
207
207
  synapse/_scripts/update_synapse_database.py,sha256=RGj8-lFjFB74WgUjTZXi-zkGcMWYR10eyg2GtMJ1YFQ,4005
208
208
  synapse/_scripts/register_new_matrix_user.py,sha256=CIdZpokRTis07Jw3SyUeH3WX-zPBJLEHh_4Gs_NSwbs,10757
209
- synapse/_scripts/hash_password.py,sha256=TFXUhlFStn35ZLN88j6rxN-odU9HRkge5VmZlO5_WaQ,2612
209
+ synapse/_scripts/hash_password.py,sha256=m6NTSEkFMyvUc4bEBtRGpF-fUBZKPmL1slrVrqKQU14,2621
210
210
  synapse/_scripts/generate_config.py,sha256=KaYWiSVP50PQnhDvrfW6iKiIsPDn_PeAKnm43Tsklqo,2336
211
211
  synapse/_scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
212
212
  synapse/_scripts/synapse_port_db.py,sha256=lrXRqYTd2T3eWJb7lHT4ZufXHvf3dWOepQ7n6Dp0O1c,56646
@@ -873,7 +873,7 @@ synapse/server_notices/resource_limits_server_notices.py,sha256=VpFHZn1DTkpmVjSK
873
873
  synapse/server_notices/worker_server_notices_sender.py,sha256=SYuUXW1yYSIO1bEvaRKXD8DPdCVJ3hDbzrAaDBD50Qo,1388
874
874
  synapse/server_notices/server_notices_manager.py,sha256=pGqkoJrmOGpx5rjL0W0yJ151YesdZP9_dgM3Vzy9vDY,14620
875
875
  synapse/handlers/sync.py,sha256=di99Dk_f8KQmDN0WZiFvn0vPn2jQ0N5YmH3wJqiFBSw,132288
876
- synapse/handlers/auth.py,sha256=avmeBUbyBSXDcOk_-LyMVeBvWcUDWXAx0Rts8gnO1xY,100397
876
+ synapse/handlers/auth.py,sha256=MtwCo5_HDILviQdHtg6WEz2hHtLKe5qhDPf8jDyMAso,100948
877
877
  synapse/handlers/oidc.py,sha256=h6Xn5-C_rnD-4IvCu4Lp_sAPKBOskf4WFaLfAOZezcw,71896
878
878
  synapse/handlers/push_rules.py,sha256=WkYG-vbbavU8V-pKuWSdwMQLEkHupvuCJIXqS4SpRFI,6062
879
879
  synapse/handlers/e2e_keys.py,sha256=OOGG7GVdNTrRfmwYM5GnqYYC7BFFwDtNkkDqSCzMpbg,75373
@@ -77,7 +77,7 @@ def main() -> None:
77
77
  if len(bytes_to_hash) > 72:
78
78
  # bcrypt only looks at the first 72 bytes
79
79
  print(
80
- f"Password is too long ({len(bytes_to_hash)} bytes); truncating to 72 bytes for bcrypt. "
80
+ f"Password + pepper is too long ({len(bytes_to_hash)} bytes); truncating to 72 bytes for bcrypt. "
81
81
  "This is expected behaviour and will not affect a user's ability to log in. 72 bytes is "
82
82
  "sufficient entropy for a password."
83
83
  )
synapse/handlers/auth.py CHANGED
@@ -1691,7 +1691,7 @@ class AuthHandler:
1691
1691
  #
1692
1692
  # Note: we explicitly DO NOT log the length of the user's password here.
1693
1693
  logger.debug(
1694
- "Password is too long; truncating to 72 bytes for bcrypt. "
1694
+ "Password + pepper is too long; truncating to 72 bytes for bcrypt. "
1695
1695
  "This is expected behaviour and will not affect a user's ability to log in. 72 bytes is "
1696
1696
  "sufficient entropy for a password."
1697
1697
  )
@@ -1720,9 +1720,20 @@ class AuthHandler:
1720
1720
  def _do_validate_hash(checked_hash: bytes) -> bool:
1721
1721
  # Normalise the Unicode in the password
1722
1722
  pw = unicodedata.normalize("NFKC", password)
1723
+ password_pepper = self.hs.config.auth.password_pepper
1724
+
1725
+ bytes_to_hash = pw.encode("utf8") + password_pepper.encode("utf8")
1726
+ if len(bytes_to_hash) > 72:
1727
+ # bcrypt only looks at the first 72 bytes
1728
+ logger.debug(
1729
+ "Password + pepper is too long; truncating to 72 bytes for bcrypt. "
1730
+ "This is expected behaviour and will not affect a user's ability to log in. 72 bytes is "
1731
+ "sufficient entropy for a password."
1732
+ )
1733
+ bytes_to_hash = bytes_to_hash[:72]
1723
1734
 
1724
1735
  return bcrypt.checkpw(
1725
- pw.encode("utf8") + self.hs.config.auth.password_pepper.encode("utf8"),
1736
+ bytes_to_hash,
1726
1737
  checked_hash,
1727
1738
  )
1728
1739