Skip to content

Commit

Permalink
BREAKING: casefold file paths before rkey hashing (for case insensiti…
Browse files Browse the repository at this point in the history
…ve FS behavior)
  • Loading branch information
spearcat committed Dec 5, 2024
1 parent db1057b commit a3e5a29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sync/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const STATIC_SALT = toString(

export function getLocalFileRkey(file: TFile | { path: string, vaultName: string }, passphrase: string) {
// TODO is it safe to include passphrase here?
return hashFileName(`${file.path}:${'vaultName' in file ? file.vaultName : file.vault.getName()}:${passphrase}:${STATIC_SALT}`);
return hashFileName(`${file.path.toLowerCase()}:${('vaultName' in file ? file.vaultName : file.vault.getName()).toLowerCase()}:${passphrase}:${STATIC_SALT}`);
}

export function getPublicFileRkey(file: TFile | { path: string, vaultName: string }): string {
Expand Down

0 comments on commit a3e5a29

Please sign in to comment.