Bug fixes and encryption handling
This commit is contained in:
1 parent
ca0b649ff6
commit
342ac95282
4 files changed
+31
-15
No files matched your search
@@ -436,7 +436,6 @@ Note.get = (userId, noteId, password = '') => {
|
||||
|
||||
//To many attempts in less than 5 minutes, note is locked
|
||||
if(noteData.decrypt_attempts_count > 3 && timeSinceLastUnlock < 300){
|
||||
console.log('Locked Out')
|
||||
noteLockedOut = true
|
||||
}
|
||||
|
||||
@@ -444,7 +443,6 @@ Note.get = (userId, noteId, password = '') => {
|
||||
if(noteData.decrypt_attempts_count > 0 && timeSinceLastUnlock > 300){
|
||||
noteLockedOut = false
|
||||
noteData.decrypt_attempts_count = 0
|
||||
console.log('Resseting Lockout')
|
||||
db.promise().query('UPDATE note_raw_text SET last_decrypted_date = ?, decrypt_attempts_count = 0 WHERE id = ?', [nowTime, rawTextId ])
|
||||
}
|
||||
}
|
||||
@@ -628,8 +626,10 @@ Note.search = (userId, searchQuery, searchTags, fastFilters) => {
|
||||
searchAllNotes = true
|
||||
}
|
||||
|
||||
//Encrypted Note
|
||||
if(fastFilters.onlyShowEncrypted == 1){
|
||||
noteSearchQuery += ' AND encrypted = 1'
|
||||
searchAllNotes = true
|
||||
}
|
||||
|
||||
//If tags are passed, use those tags in search
|
||||
|
||||
Reference in new issue
Block a user