@rubytech/create-maxy-code 0.1.408 → 0.1.409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/server/server.js +9 -2
package/package.json
CHANGED
package/payload/server/server.js
CHANGED
|
@@ -10601,13 +10601,20 @@ function listHostCredsMdats() {
|
|
|
10601
10601
|
return {};
|
|
10602
10602
|
}
|
|
10603
10603
|
}
|
|
10604
|
+
function decodeKeychainBlob(raw) {
|
|
10605
|
+
if (raw.length > 0 && raw.length % 2 === 0 && /^[0-9a-fA-F]+$/.test(raw)) {
|
|
10606
|
+
return Buffer.from(raw, "hex").toString("utf-8");
|
|
10607
|
+
}
|
|
10608
|
+
return raw;
|
|
10609
|
+
}
|
|
10604
10610
|
function readHostCredsBlob(service) {
|
|
10605
10611
|
try {
|
|
10606
|
-
const
|
|
10612
|
+
const raw = execFileSync2("security", ["find-generic-password", "-w", "-s", service], {
|
|
10607
10613
|
encoding: "utf-8",
|
|
10608
10614
|
timeout: 1e4
|
|
10609
10615
|
}).trim();
|
|
10610
|
-
|
|
10616
|
+
if (raw.length === 0) return null;
|
|
10617
|
+
return decodeKeychainBlob(raw);
|
|
10611
10618
|
} catch {
|
|
10612
10619
|
return null;
|
|
10613
10620
|
}
|