Fixed typos in privacy policy, made use of localStorage more efficient, fixed privacy policy's grammar and updated names of localStorage items in order to fit in with a standardised naming schema (and updated the privacy policy to reflect this)

This commit is contained in:
Tracker-Friendly 2024-07-30 11:23:22 +01:00
parent e63fa13553
commit c911abea92
7 changed files with 105 additions and 116 deletions

View File

@ -18,41 +18,41 @@
<p>Welcome to the Burgernotes privacy policy! Burgernotes is <a
href="https://concord.hectabit.org/hectabit/burgernotes">free & open source</a> software licensed under the <a
href="https://www.gnu.org/licenses/agpl-3.0.en.html">GNU AGPL-3.0</a>.</p>
<p>In this document, the terms "we" and "us" refer to the Hectabit Project, an open source initiative and the creator of Burgernotes. The terms "you" and "the user" refer the the reader of this privacy policy and all users of Burgernotes. "This website" and "this service" refer to Burgernotes, an online website you are currently using.</p>
<p>In this document, the terms "we" and "us" refer to the Hectabit Project, an open source initiative and the creator of Burgernotes. The terms "you" and "the user" refer to the reader of this privacy policy and all users of Burgernotes. "This website" and "this service" refer to Burgernotes, an online website you are currently using.</p>
<h2 class="w300">Information collected when signing up</h2>
<p>When signing up for an account, we collect and store the following information:</p>
<ul>
<li>Username, and your password hashed</li>
<p>This is used to authenticate you into our service when you log in</p>
<li>Date of account creation</li>
<p>This is used so that we can see inactive accounts and suspend them</p>
<li>Web browser "User Agent"</li>
<p>This is used so you are able to recognise your devices signing into your account</p>
<li class="w900">Username, and your password hashed</li>
<li>This is used to authenticate you into our service when you log in</li>
<li class="w900">Date of account creation</li>
<li>This is used so that we can see inactive accounts and suspend them</li>
<li class="w900">Web browser "User Agent"</li>
<li>This is used, so you are able to recognise your devices signing in to your account</li>
</ul>
<h2 class="w300">Information collected when logging in</h2>
<p>When logging back in to your account, we collect and store the following information:</p>
<ul>
<li>Web browser "User agent"</li>
<p>This is used so you are able to recognise your devices signing into your account</p>
<li class="w900">Web browser "User agent"</li>
<li>This is used, so you are able to recognise your devices signing in to your account</li>
</ul>
<h2 class="w300">Information we collect while using our services</h2>
<p>When you create a note, we collect and use this information:</p>
<ul>
<li>Encrypted note content and title</li>
<p>This is used so that you may retrieve the note later</p>
<li>Note creator</li>
<p>This is used so that we can make sure your note is not given to anyone else</p>
<li>Note creation date</li>
<p>This is used so that your notes are listed by age if no edited date exists</p>
<li>Note last edited date</li>
<p>This is used so that your notes are listed by age</p>
<li class="w900">Encrypted note content and title</li>
<li>This is used so that you may retrieve the note later</li>
<li class="w900">Note creator</li>
<li>This is used so that we can make sure your note is not given to anyone else</li>
<li class="w900">Note creation date</li>
<li>This is used so that your notes are listed by age if no edited date exists</li>
<li class="w900">Note last edited date</li>
<li>This is used so that your notes are listed by age</li>
</ul>
<p>When you edit a note, we collect and use this information:</p>
<ul>
<li>Encrypted note content and title</li>
<p>This is used so that you may retrieve the note later</p>
<li>Note last edited date</li>
<p>This is used so that your notes are listed by age</p>
<li class="w900">Encrypted note content and title</li>
<li>This is used so that you may retrieve the note later</li>
<li class="w900">Note last edited date</li>
<li>This is used so that your notes are listed by age</li>
</ul>
<h2 class="w300">How we use your data</h2>
<p>We use your data to make our services work. We don't share your information with third-parties.</p>
@ -61,38 +61,37 @@
(Advanced Encryption Standard - Cipher Block Chaining) 256-bit encryption.</p>
<p>We can only see:</p>
<ul>
<li>Note creation date</li>
<p>This is used so that your notes are listed by age if no edited date exists</p>
<li>Note last edited date</li>
<p>This is used so that your notes are listed by age</p>
<li>Note creator</li>
<p>This is used so that we can make sure your note is not given to anyone else</p>
<li class="w900">Note creation date</li>
<li>This is used so that your notes are listed by age if no edited date exists</li>
<li class="w900">Note last edited date</li>
<li>This is used so that your notes are listed by age</li>
<li class="w900">Note creator</li>
<li>This is used so that we can make sure your note is not given to anyone else</li>
</ul>
<p><b>Not</b> note content or title.</p>
<h2 class="w300">Use of cookies</h2>
<p>Burgernotes does not use cookies in the conventional sense. Burgernotes places infomation into localStorage, a type of blob storage similar to cookies, but not accessible to third-party websites or the server.</p>
<p>This ensures that a malicious server or third-party websites cannot tell your infomation.</p>
<p>Burgernotes does not use cookies in the conventional sense. Burgernotes places information into localStorage, a type of blob storage similar to cookies, but not accessible to third-party websites or the server.</p>
<p>This ensures that a malicious server or third-party websites cannot tell your information.</p>
<ul>
<li>DONOTSHARE-secretkey</li>
<p>This is used by the client to send to the server in order to identify you as... you.</p>
<p>This contains no useful infomation and is simply a string of random bytes. If this is shared, you may simply remove the offending secretKey from your session list, by clicking "X" on the device you have logged in on to create this key.</p>
<li>DONOTSHARE-password</li>
<p>This is used by the aformentioned AES to encrypt and decrypt your notes. It never leaves your device.</p>
<p>This is derived from your password and is therefore sensitive and should NEVER, EVER be shared. If you have done so, change your password as soon as possible.</p>
<li>SETTING-fontsize</li>
<p>This is used to determine the size of your font. It is not sensitive infomation and can be freely shared, though it never leaves your device.</p>
<li>FIRSTVISIT</li>
<p>This is used to determine if the user guide should be played, showing on a mobile device how touch gestures are used. It is not sensitive infomation and can be freely shared, though it never leaves your device.</p>
<li>NEWVERSION<li>
<p>This determines if you have seen the "What's New?" dialouge displayed in each new version. It is not sensitive infomation and can be freely shared, though it never leaves your device.</p>
<li>homeserver</li>
<p>This determines which server Burgernotes should connect to. It is not sensitive infomation and can be freely shared, though it never leaves your device.</li>
<li class="w900">PRIVATE-secretKey</li>
<li>This is used by the client to send to the server in order to identify you as... you.</li>
<li>This contains no useful information and is simply a string of random bytes. If this is shared, you may simply remove the offending secretKey from your session list, by clicking "X" on the device you have logged in on to create this key.</li>
<li class="w900">PRIVATE-cryptoKey</li>
<li>This is used by the aforementioned AES to encrypt and decrypt your notes. It never leaves your device.</li>
<li>This is derived from your password and is therefore sensitive and should NEVER, EVER be shared. If you have done so, change your password as soon as possible.</li>
<li class="w900">SETTING-fontsize</li>
<li>This is used to determine the size of your font. It is not sensitive information and can be freely shared, though it never leaves your device.</li>
<li class="w900">SETTING-newVersion<li>
<li>This determines if you have seen the "What's New?" dialog displayed in each new version. It is not sensitive information and can be freely shared, though it never leaves your device.</li>
<li class="w900">SETTING-homeServer</li>
<li>This determines which server Burgernotes should connect to. It is not sensitive information and can be freely shared, though it never leaves your device.</li>
</ul>
<h2 class="w300">We don't sell your data</h2>
<p>We don't sell or share your data to advertisers or third-parties, and no such thing exists on this website - it is entirely self-contained. Not even an external font service is used.</p>
<h2 class="w300">Liability</h2>
<p>We take no responsibility for the use of Burgernotes, or any external instances provided by third-parties. We
refuse liability for any inappropriate or illegal use of Burgernotes, as it is not within our power to prevent it.</p>
<p>This is a summerisation of the below paragraph, found in AGPL-3.0, as linked above.</p>
<p>This is a summarization of the below paragraph, found in AGPL-3.0, as linked above.</p>
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
@ -103,7 +102,7 @@
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.</p>
<p>Burgernotes comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.</p>
<p>Burgernotes is compatible with the UK GDPR and the Californian Data Protection Regulation. We do not knowingly serve citizens in the European Union, and those who do so do so at their own risk. The only violating law of the EU GDPR is that it is no longer hosted in an EU country after the events of Brexit.</p>
<p>Burgernotes is compatible with the UK GDPR and the Californian Data Protection Regulation. We do not knowingly serve citizens in the European Union, and those who do so at their own risk. The only violating law of the EU GDPR is that it is no longer hosted in an EU country after the events of Brexit.</p>
<br>
<button class="clickButton" onclick="back()">Take me back where I was!</button>
<br><br>

View File

@ -5,9 +5,9 @@ let statusBox = document.getElementById("statusBox")
let changeButton = document.getElementById("changeButton")
let backButton = document.getElementById("backButton")
let remote = localStorage.getItem("homeserverURL")
let remote = localStorage.getItem("SETTING-homeServer")
if (remote == null) {
localStorage.setItem("homeserverURL", "https://notes.hectabit.org")
localStorage.setItem("SETTING-homeServer", "https://notes.hectabit.org")
remote = "https://notes.hectabit.org"
}

View File

@ -1,14 +1,14 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
if (localStorage.getItem("DONOTSHARE-secretkey") !== null || localStorage.getItem("DONOTSHARE-password") !== null) {
if (localStorage.getItem("PRIVATE-secretKey") !== null || localStorage.getItem("PRIVATE-cryptoKey") !== null) {
window.location.replace("/app/")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
let remote = localStorage.getItem("homeserverURL")
let remote = localStorage.getItem("SETTING-homeServer")
if (remote == null) {
localStorage.setItem("homeserverURL", "https://notes.hectabit.org")
localStorage.setItem("SETTING-homeServer", "https://notes.hectabit.org")
remote = "https://notes.hectabit.org"
}
@ -170,8 +170,8 @@ signupButton.addEventListener("click", () => {
showElements(true)
} else if (loginOld.status === 200) {
statusBox.innerText = "Setting up encryption keys..."
localStorage.setItem("DONOTSHARE-secretkey", loginDataOld["key"])
localStorage.setItem("DONOTSHARE-password", await hashwasm.argon2id({
localStorage.setItem("PRIVATE-secretKey", loginDataOld["key"])
localStorage.setItem("PRIVATE-cryptoKey", await hashwasm.argon2id({
password: password,
salt: new TextEncoder().encode("I love Burgernotes!"),
parallelism: 1,
@ -203,8 +203,8 @@ signupButton.addEventListener("click", () => {
}
} else if (login.status === 200) {
statusBox.innerText = "Setting up encryption keys..."
localStorage.setItem("DONOTSHARE-secretkey", loginData["key"])
localStorage.setItem("DONOTSHARE-password", await hashwasm.argon2id({
localStorage.setItem("PRIVATE-secretKey", loginData["key"])
localStorage.setItem("PRIVATE-cryptoKey", await hashwasm.argon2id({
password: password,
salt: new TextEncoder().encode("I love Burgernotes!"),
parallelism: 1,

View File

@ -1,7 +1,7 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
window.localStorage.removeItem("DONOTSHARE-secretkey")
window.localStorage.removeItem("DONOTSHARE-password")
window.localStorage.removeItem("PRIVATE-secretKey")
window.localStorage.removeItem("PRIVATE-cryptoKey")
window.localStorage.removeItem("CACHE-username")
window.location.replace("/login")

View File

@ -1,12 +1,19 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
if (localStorage.getItem("DONOTSHARE-secretkey") === null || localStorage.getItem("DONOTSHARE-password") === null) {
let secretKey = localStorage.getItem("PRIVATE-secretKey")
let password = localStorage.getItem("PRIVATE-cryptoKey")
let fontSize = localStorage.getItem("SETTING-fontsize")
let remote = localStorage.getItem("SETTING-homeServer")
if (secretKey === null || password === null) {
window.location.replace("/login")
document.body.innerHTML = "Redirecting..."
throw new Error();
} else if (fontSize === null) {
localStorage.setItem("SETTING-fontsize", "16")
fontSize = 16
}
let remote = localStorage.getItem("homeserverURL")
if (remote == null) {
localStorage.setItem("homeserverURL", "https://notes.hectabit.org")
remote = "https://notes.hectabit.org"
@ -17,10 +24,6 @@ function formatBytes(a, b = 2) {
return `${parseFloat((a / Math.pow(1000, d)).toFixed(c))} ${["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][d]}`
}
let secretkey = localStorage.getItem("DONOTSHARE-secretkey")
let password = localStorage.getItem("DONOTSHARE-password")
let currentFontSize = 16
let offlineMode = false
let backButton = document.getElementById("backButton")
let usernameBox = document.getElementById("usernameBox")
@ -86,7 +89,6 @@ function base64ToArrayBuffer(base64) {
}
async function getKey() {
let password = localStorage.getItem("DONOTSHARE-password")
let salt = new TextEncoder().encode("I love Burgernotes!")
let cryptoKey = await window.crypto.subtle.importKey("raw", new TextEncoder().encode(password), "PBKDF2", false, ["deriveBits", "deriveKey"])
return await window.crypto.subtle.deriveKey({
@ -268,22 +270,15 @@ document.addEventListener("DOMContentLoaded", async function () {
});
function updateFont() {
currentFontSize = localStorage.getItem("SETTING-fontsize")
noteBox.style.fontSize = currentFontSize + "px"
textSizeBox.innerText = currentFontSize + "px"
noteBox.style.fontSize = fontSize + "px"
textSizeBox.innerText = fontSize + "px"
}
async function checknetwork() {
let loggedInEndpoint
if (localStorage.getItem("legacy") === "true") {
loggedInEndpoint = "userinfo"
} else {
loggedInEndpoint = "loggedin"
}
fetch(remote + "/api/" + loggedInEndpoint, {
fetch(remote + "/api/loggedin", {
method: "POST",
body: JSON.stringify({
secretKey: localStorage.getItem("DONOTSHARE-secretkey"),
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -315,19 +310,14 @@ document.addEventListener("DOMContentLoaded", async function () {
});
}
if (localStorage.getItem("SETTING-fontsize") === null) {
localStorage.setItem("SETTING-fontsize", "16")
updateFont()
} else {
updateFont()
}
updateFont()
textPlusBox.addEventListener("click", () => {
localStorage.setItem("SETTING-fontsize", String(Number(localStorage.getItem("SETTING-fontsize")) + Number(1)))
localStorage.setItem("SETTING-fontsize", String(Number(fontSize) + Number(1)))
updateFont()
});
textMinusBox.addEventListener("click", () => {
localStorage.setItem("SETTING-fontsize", String(Number(localStorage.getItem("SETTING-fontsize")) - Number(1)))
localStorage.setItem("SETTING-fontsize", String(Number(fontSize) - Number(1)))
updateFont()
});
@ -345,7 +335,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/userinfo", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -386,7 +376,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/deleteaccount", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -429,11 +419,11 @@ document.addEventListener("DOMContentLoaded", async function () {
async function fatalError(notes, passwordBackup) {
displayError("Something went wrong! Your password change has failed. Attempting to revert changes...")
password = passwordBackup
localStorage.setItem("DONOTSHARE-password", password)
localStorage.setItem("PRIVATE-cryptoKey", password)
let changePasswordBackResponse = await fetch(remote + "/api/changepassword", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
newPassword: await hashpass(oldPass),
migration: false
}),
@ -493,7 +483,7 @@ document.addEventListener("DOMContentLoaded", async function () {
const response = await fetch(remote + "/api/changepassword", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
newPassword: await hashpass(newPass)
}),
headers: {
@ -513,11 +503,11 @@ document.addEventListener("DOMContentLoaded", async function () {
hashLength: 32,
outputType: "hex"
})
localStorage.setItem("DONOTSHARE-password", password)
localStorage.setItem("PRIVATE-cryptoKey", password)
let purgeNotes = await fetch(remote + "/api/purgenotes", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -555,7 +545,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/sessions/list", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -594,7 +584,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/sessions/remove", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
sessionId: responseData[i]["id"]
}),
headers: {
@ -644,7 +634,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/readnote", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
noteId: nameithink,
}),
headers: {
@ -701,7 +691,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/editnote", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
noteId: nameithink,
content: encryptedText,
title: encryptedTitle
@ -729,7 +719,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/listnotes", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -785,7 +775,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/removenote", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
noteId: noteData["id"]
}),
headers: {
@ -835,7 +825,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/newnote", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
noteName: encryptedName,
}),
headers: {
@ -870,7 +860,7 @@ document.addEventListener("DOMContentLoaded", async function () {
let exportNotesFetch = await fetch(remote + "/api/exportnotes", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -901,7 +891,7 @@ document.addEventListener("DOMContentLoaded", async function () {
let importNotesFetch = await fetch(remote + "/api/importnotes", {
method: "POST",
body: JSON.stringify({
"secretKey": localStorage.getItem("DONOTSHARE-secretkey"),
"secretKey": secretKey,
"notes": JSON.stringify(plaintextNotes)
}),
headers: {
@ -912,10 +902,10 @@ document.addEventListener("DOMContentLoaded", async function () {
}
function firstNewVersion() {
if (localStorage.getItem("NEWVERSION") === "1.2") {
if (localStorage.getItem("SETTING-newVersion") === "2.0") {
return false;
} else {
localStorage.setItem("NEWVERSION", "1.2")
localStorage.setItem("SETTING-newVersion", "2.0")
return true;
}
}
@ -961,7 +951,7 @@ document.addEventListener("DOMContentLoaded", async function () {
fetch(remote + "/api/removenote", {
method: "POST",
body: JSON.stringify({
secretKey: secretkey,
secretKey: secretKey,
noteId: selectedNote
}),
headers: {

View File

@ -1,14 +1,16 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
if (localStorage.getItem("DONOTSHARE-secretkey") === null || localStorage.getItem("DONOTSHARE-password") === null) {
let secretKey = localStorage.getItem("PRIVATE-secretKey")
let cryptoKey = localStorage.getItem("PRIVATE-cryptoKey")
if (secretKey === null || cryptoKey === null) {
window.location.replace("/login")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
let remote = localStorage.getItem("homeserverURL")
let remote = localStorage.getItem("SETTING-homeServer")
if (remote == null) {
localStorage.setItem("homeserverURL", "https://notes.hectabit.org")
localStorage.setItem("SETTING-homeServer", "https://notes.hectabit.org")
remote = "https://notes.hectabit.org"
}
@ -44,7 +46,6 @@ function showInput(inputType) {
case 3:
information.innerText = "You have successfully migrated to new Burgernotes! Enjoy the more secure and feature-rich experience. Click continue to return to the app."
titleBox.innerText = "Migration Complete"
fileInput.classList.remove("hidden")
break
}
}
@ -94,15 +95,14 @@ function back() {
}
async function getKey() {
let password = localStorage.getItem("DONOTSHARE-password")
let salt = new TextEncoder().encode("I love Burgernotes!")
let cryptoKey = await window.crypto.subtle.importKey("raw", new TextEncoder().encode(password), "PBKDF2", false, ["deriveBits", "deriveKey"])
let cryptoKeyFormatted = await window.crypto.subtle.importKey("raw", new TextEncoder().encode(cryptoKey), "PBKDF2", false, ["deriveBits", "deriveKey"])
return await window.crypto.subtle.deriveKey({
name: "PBKDF2",
salt,
iterations: 1,
hash: "SHA-512"
}, cryptoKey, {name: "AES-GCM", length: 256}, true, ["encrypt", "decrypt"])
}, cryptoKeyFormatted, {name: "AES-GCM", length: 256}, true, ["encrypt", "decrypt"])
}
function arrayBufferToBase64(buffer) {
@ -132,7 +132,7 @@ async function importNotes(plaintextNotes) {
let purgeNotesFetch = await fetch(remote + "/api/purgenotes", {
method: "POST",
body: JSON.stringify({
"secretKey": localStorage.getItem("DONOTSHARE-secretkey"),
"secretKey": secretKey,
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
@ -144,7 +144,7 @@ async function importNotes(plaintextNotes) {
let importNotesFetch = await fetch(remote + "/api/importnotes", {
method: "POST",
body: JSON.stringify({
"secretKey": localStorage.getItem("DONOTSHARE-secretkey"),
"secretKey": secretKey,
"notes": JSON.stringify(plaintextNotes)
}),
headers: {
@ -164,7 +164,7 @@ async function exportNotes() {
let exportNotesFetch = await fetch(remote + "/api/exportnotes", {
method: "POST",
body: JSON.stringify({
secretKey: localStorage.getItem("DONOTSHARE-secretkey")
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"

View File

@ -1,14 +1,14 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
if (localStorage.getItem("DONOTSHARE-secretkey") !== null || localStorage.getItem("DONOTSHARE-password") !== null) {
if (localStorage.getItem("PRIVATE-secretKey") !== null || localStorage.getItem("PRIVATE-cryptoKey") !== null) {
window.location.replace("/app/")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
let remote = localStorage.getItem("homeserverURL")
let remote = localStorage.getItem("SETTING-homeServer")
if (remote == null) {
localStorage.setItem("homeserverURL", "https://notes.hectabit.org")
localStorage.setItem("SETTING-homeServer", "https://notes.hectabit.org")
remote = "https://notes.hectabit.org"
}
@ -137,8 +137,8 @@ signupButton.addEventListener("click", () => {
let responseData = await response.json()
if (response.status === 200) {
statusBox.innerText = "Setting up encryption keys..."
localStorage.setItem("DONOTSHARE-secretkey", responseData["key"])
localStorage.setItem("DONOTSHARE-password", await hashwasm.argon2id({
localStorage.setItem("PRIVATE-secretKey", responseData["key"])
localStorage.setItem("PRIVATE-cryptoKey", await hashwasm.argon2id({
password: password,
salt: new TextEncoder().encode("I love Burgernotes!"),
parallelism: 1,