Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aws/src/lambdas/insertDomainName/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const handler = async (event) => {
};
}
const { UUID, domain } = request_body;
console.log(UUID, domain);
try {
const connection = await (0, promise_1.createConnection)(dbConfig);
const [rows] = await connection.execute('SELECT 1 FROM users WHERE uuid = ? LIMIT 1', [UUID]);
Expand Down
1 change: 1 addition & 0 deletions aws/src/lambdas/insertDomainName/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const handler = async (event: APIGatewayEvent | APIGatewayProxyEventV2 ):
}

const { UUID, domain } = request_body;
console.log(UUID, domain);

try {
const connection = await createConnection(dbConfig);
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions aws/src/lambdas/insertDomainName/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
},
"devDependencies": {
"@types/aws-lambda": "^8.10.147",
"@types/node": "^22.15.3",
"typescript": "^5.7.3"
},
"dependencies": {
"mysql2": "^3.13.0"
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { parse } from "tldts";
import { getEncryptedUuid } from '../site_login_popup/site_login_component';

export default function Site_SignUp() {
const userId = "randomuuid";
const UUID = "randomuuid";

const [keyString, setKeyString] = useState("");
const [loading, setLoading] = useState(false);
Expand All @@ -19,9 +19,9 @@ export default function Site_SignUp() {
setSpinnerMessage('Generating Password...');

try {
const userIdEncrypted = await getEncryptedUuid(userId);
const userIdEncrypted = await getEncryptedUuid(UUID);
const decryptedText = await decrypt(userIdEncrypted, keyString);
if (decryptedText === userId) {
if (decryptedText === UUID) {
console.log("Valid Simple passphrase: User Authenticated");

const domain = parse(window.location.href).domain ?? "";
Expand All @@ -33,9 +33,14 @@ export default function Site_SignUp() {
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ userId, domain })
body: JSON.stringify({ UUID, domain })
});

if (response.status === 401) {
console.log("Duplicate entry detected, launching login popup...");
chrome.runtime.sendMessage({ action: "detected_login_form" });
return;
}
if (!response.ok) {
throw new Error("Failed to add domain to DB");
}
Expand Down
14 changes: 14 additions & 0 deletions extension/src/hashpass/public/content.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
// Function to inject a login popup into the page using the bundled TSX component
function injectLoginPopup() {
console.log("Injecting Login Popup...");

const existingSignup = document.getElementById('hashpass-signup-popup');
if (existingSignup) {
existingSignup.remove();
console.log("Existing signup popup removed.");
}

const existingLogin = document.getElementById('hashpass-login-popup');
if (existingLogin) {
existingLogin.remove();
console.log("Existing login popup removed.");
}

const host = document.createElement('div');
host.id = 'hashpass-login-popup';
host.style.position = 'fixed';
Expand Down
15 changes: 10 additions & 5 deletions extension/src/hashpass/public/dist/components.bundle.js

Large diffs are not rendered by default.

Loading