feat(core): import_lastpass — SecureNote rows
Rows with url == "http://sn" map to SecureNoteCore with extra copied verbatim into the body. LastPass-packed structured data (credit cards, addresses) flows through unparsed — users can re-categorize manually post-import. SecureNote rows skip the password-required check that applies to Logins. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ use zeroize::Zeroizing;
|
||||
|
||||
use crate::error::{RelicarioError, Result};
|
||||
use crate::item::Item;
|
||||
use crate::item_types::{ItemCore, LoginCore};
|
||||
use crate::item_types::{ItemCore, LoginCore, SecureNoteCore};
|
||||
|
||||
/// LastPass column order. The header row must contain these exact column
|
||||
/// names in this exact order.
|
||||
@@ -110,6 +110,20 @@ fn map_row(
|
||||
}));
|
||||
}
|
||||
|
||||
// SecureNote marker: LastPass exports notes with `url` set to "http://sn".
|
||||
// The `extra` column carries the body verbatim.
|
||||
if url == "http://sn" {
|
||||
let mut item = Item::new(
|
||||
name.to_string(),
|
||||
ItemCore::SecureNote(SecureNoteCore {
|
||||
body: Zeroizing::new(extra.to_string()),
|
||||
}),
|
||||
);
|
||||
item.group = if group.is_empty() { None } else { Some(group.to_string()) };
|
||||
item.favorite = fav == "1";
|
||||
return (Some(item), None);
|
||||
}
|
||||
|
||||
if password.is_empty() {
|
||||
return (None, Some(ImportWarning {
|
||||
row,
|
||||
|
||||
Reference in New Issue
Block a user