use hash instead of path for key

This commit is contained in:
cupcakearmy 2021-05-16 11:16:25 +02:00
parent e332dc63e8
commit 5dff12ea70
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
3 changed files with 10 additions and 2 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.0] - 2021-05-16
### Security
- Using hash `#` instead of path
## [1.0.11] - 2021-05-08 ## [1.0.11] - 2021-05-08
### Added ### Added

View File

@ -68,7 +68,7 @@
type="text" type="text"
readonly readonly
label="share link" label="share link"
value="{window.location.origin}/note/{result.id}/{result.password}" value="{window.location.origin}/note/{result.id}#{result.password}"
copy copy
data-testid="note-share-link" data-testid="note-share-link"
/> />

View File

@ -16,8 +16,8 @@
import Button from '$lib/ui/Button.svelte' import Button from '$lib/ui/Button.svelte'
export let id: string export let id: string
export let password: string
let password: string
let note: NotePublic | null = null let note: NotePublic | null = null
let exists = false let exists = false
@ -28,6 +28,8 @@
try { try {
loading = true loading = true
error = null error = null
password = window.location.hash.slice(1)
console.log(password)
await info(id) await info(id)
exists = true exists = true
} catch { } catch {