matrix-synapse 1.141.0rc1__cp39-abi3-manylinux_2_28_aarch64.whl → 1.141.0rc2__cp39-abi3-manylinux_2_28_aarch64.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
@@ -12,7 +12,7 @@ synapse/_scripts/generate_config.py,sha256=KaYWiSVP50PQnhDvrfW6iKiIsPDn_PeAKnm43
12
12
  synapse/_scripts/generate_log_config.py,sha256=9lnzZeWYZTQtM-Y1iCt4kOegL4TkqZ2l21qPCbOBhPA,1459
13
13
  synapse/_scripts/generate_signing_key.py,sha256=lauzE2E0agnKNv7jhhSlV54htRLm9uX1GGVR2aFl9gM,1541
14
14
  synapse/_scripts/generate_workers_map.py,sha256=PymWyPFa33HCSvGvK_ltAUoZMM7EFHUCKGiC2xqqncg,10260
15
- synapse/_scripts/hash_password.py,sha256=TFXUhlFStn35ZLN88j6rxN-odU9HRkge5VmZlO5_WaQ,2612
15
+ synapse/_scripts/hash_password.py,sha256=m6NTSEkFMyvUc4bEBtRGpF-fUBZKPmL1slrVrqKQU14,2621
16
16
  synapse/_scripts/move_remote_media_to_new_store.py,sha256=VOGFBrZM3qBW4ysmdD8XW9vNTXJOF7IyBRSpoh7pRdc,3780
17
17
  synapse/_scripts/register_new_matrix_user.py,sha256=CIdZpokRTis07Jw3SyUeH3WX-zPBJLEHh_4Gs_NSwbs,10757
18
18
  synapse/_scripts/review_recent_signups.py,sha256=MeEnHMpHiLGBh6xvwSyH4RSDM7YZKkygtC3-lDGJvCU,6422
@@ -136,7 +136,7 @@ synapse/handlers/account_data.py,sha256=CQAfVkJPMQsbl53lRZK_lHmkR0O2RM80rjwCfa9g
136
136
  synapse/handlers/account_validity.py,sha256=5HS1hL1rGe72xaOLENGwFrVsjXaezhEBWIctAMqWhlU,13924
137
137
  synapse/handlers/admin.py,sha256=P7e3bwsIDxOvRIzlZOArfMRWtJD-KkyLzDfubsUEq3k,22800
138
138
  synapse/handlers/appservice.py,sha256=vtqScclvlKH_LJYcG9v8BtG70aS9VL60-9tFM48fiz0,40481
139
- synapse/handlers/auth.py,sha256=avmeBUbyBSXDcOk_-LyMVeBvWcUDWXAx0Rts8gnO1xY,100397
139
+ synapse/handlers/auth.py,sha256=MtwCo5_HDILviQdHtg6WEz2hHtLKe5qhDPf8jDyMAso,100948
140
140
  synapse/handlers/cas.py,sha256=ce7bB1gXa2VWRb4l36WmxP3V7nD5JrIdMOusYRysBOk,15313
141
141
  synapse/handlers/deactivate_account.py,sha256=snM3YHgREAHsbn8XwcFpSq8SW7-8_AFS5i2jCsAVaKE,14602
142
142
  synapse/handlers/delayed_events.py,sha256=ApA9UiujQ3q33HcPwolOrRvRQkzDvgbALIaOvYV_-Bg,25948
@@ -1048,10 +1048,10 @@ synapse/util/caches/response_cache.py,sha256=pfiktchF_NUhFYU96nIRcPBfsQMSpBo4Zun
1048
1048
  synapse/util/caches/stream_change_cache.py,sha256=OaYpW9ZhVz6nLqkeSUnav3QztWgxoc6U2f_OHu7AqQI,13341
1049
1049
  synapse/util/caches/treecache.py,sha256=ZgINF6s_O7NnP4-sI3kEYS2hMLxVeI8Kb3EiFUVVrWA,5948
1050
1050
  synapse/util/caches/ttlcache.py,sha256=kYDG8koywsTukoEpXJuqBsmk5Du1MFEQfBrPN97uw8E,5818
1051
- matrix_synapse-1.141.0rc1.dist-info/AUTHORS.rst,sha256=KvPRmsv8L-ZN9AA51KsR-4fZu0ajfkCbSNNH9rhRUO4,1611
1052
- matrix_synapse-1.141.0rc1.dist-info/LICENSE-AGPL-3.0,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
1053
- matrix_synapse-1.141.0rc1.dist-info/LICENSE-COMMERCIAL,sha256=EZfebSnFA3xtm1w2B9cuqpC1BF8tYjQA6HCCX9z3Zm4,255
1054
- matrix_synapse-1.141.0rc1.dist-info/METADATA,sha256=pxJtdnCUBZLV1lw3Xfdjd5Bl8etqURcHTEfKrIxjD7s,17005
1055
- matrix_synapse-1.141.0rc1.dist-info/WHEEL,sha256=aKbvbho4Bg6txuiF5Hp01zzXsTYT8dsLLPxczMB2pmY,109
1056
- matrix_synapse-1.141.0rc1.dist-info/entry_points.txt,sha256=Xf4Z-Sp4lk8P9pbRhSD40XrhhkooqYWm1OtxUlPwPgs,709
1057
- matrix_synapse-1.141.0rc1.dist-info/RECORD,,
1051
+ matrix_synapse-1.141.0rc2.dist-info/AUTHORS.rst,sha256=KvPRmsv8L-ZN9AA51KsR-4fZu0ajfkCbSNNH9rhRUO4,1611
1052
+ matrix_synapse-1.141.0rc2.dist-info/LICENSE-AGPL-3.0,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
1053
+ matrix_synapse-1.141.0rc2.dist-info/LICENSE-COMMERCIAL,sha256=EZfebSnFA3xtm1w2B9cuqpC1BF8tYjQA6HCCX9z3Zm4,255
1054
+ matrix_synapse-1.141.0rc2.dist-info/METADATA,sha256=3cIxSPUcTj5AgpZRyjRGEy4ijsmdkequvwO5-bc2ddw,17005
1055
+ matrix_synapse-1.141.0rc2.dist-info/WHEEL,sha256=aKbvbho4Bg6txuiF5Hp01zzXsTYT8dsLLPxczMB2pmY,109
1056
+ matrix_synapse-1.141.0rc2.dist-info/entry_points.txt,sha256=Xf4Z-Sp4lk8P9pbRhSD40XrhhkooqYWm1OtxUlPwPgs,709
1057
+ matrix_synapse-1.141.0rc2.dist-info/RECORD,,
@@ -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