[#7670] fixed password fields not being detected as changed

This commit is contained in:
Gani Georgiev
2026-04-27 17:34:27 +03:00
parent 44bf55097a
commit 5c9bcfaf8e
5 changed files with 21 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
## v0.37.5 (WIP)
- Fixed password fields not being detected as changed ([#7670](https://github.com/pocketbase/pocketbase/issues/7670)).
## v0.37.4 ## v0.37.4
- Added backups list scroll container ([#7655](https://github.com/pocketbase/pocketbase/issues/7655)). - Added backups list scroll container ([#7655](https://github.com/pocketbase/pocketbase/issues/7655)).

View File

@@ -11,4 +11,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs"
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk" PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk" PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases" PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
PB_VERSION = "v0.37.4" PB_VERSION = "v0.37.5-dev"

File diff suppressed because one or more lines are too long

2
ui/dist/index.html vendored
View File

@@ -13,7 +13,7 @@
<!-- prism --> <!-- prism -->
<script src="./libs/prism/prism.js" data-manual></script> <script src="./libs/prism/prism.js" data-manual></script>
<script type="module" crossorigin src="./assets/index-BB3JTWj3.js"></script> <script type="module" crossorigin src="./assets/index-76OUFdvu.js"></script>
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js"> <link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
<link rel="stylesheet" crossorigin href="./assets/index-ouas71Vg.css"> <link rel="stylesheet" crossorigin href="./assets/index-ouas71Vg.css">
</head> </head>

View File

@@ -130,7 +130,14 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
return serializeRecord(data.originalRecord); return serializeRecord(data.originalRecord);
}, },
get hasChanges() { get hasChanges() {
return data.originalRecordHash != data.recordHash; return (
data.originalRecordHash != data.recordHash
// manually check the password fields as they are out of the serialized hash
|| (
data.isAuthCollection
&& (!!data.record.password || !!data.record.passwordConfirm)
)
);
}, },
get isFormDisabled() { get isFormDisabled() {
return data.isLoading || data.isSaving || (!data.isNew && !data.hasChanges); return data.isLoading || data.isSaving || (!data.isNew && !data.hasChanges);
@@ -268,7 +275,10 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
function deleteInternalKeys(record) { function deleteInternalKeys(record) {
for (let key in record) { for (let key in record) {
if (key.startsWith("@@")) { if (
key.startsWith("@@")
|| (data.isAuthCollection && (key == "password" || key == "passwordConfirm"))
) {
delete record[key]; delete record[key];
} }
} }