Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security update + removed outdated domains #47

Merged
merged 6 commits into from
Apr 2, 2024
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
4 changes: 0 additions & 4 deletions app/[...login]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ const LoginPage = ({ params }: { params: { login: string[] } }) => {
// TODO: Move this to a config file.
const domains = [
"@solun.pm",
"@6crypt.com",
"@seal.pm",
"@xolus.de",
"@cipher.pm",
];

const [suggestedDomain, setSuggestedDomain] = useState("");
Expand Down
4 changes: 0 additions & 4 deletions app/forgot/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ const LoginPage = () => {
// TODO: Move this to a config file.
const domains = [
"@solun.pm",
"@6crypt.com",
"@seal.pm",
"@xolus.de",
"@cipher.pm",
];

const [suggestedDomain, setSuggestedDomain] = useState("");
Expand Down
4 changes: 0 additions & 4 deletions app/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ const RegisterPage = () => {
// TODO: Move to config file.
const domains = [
"@solun.pm",
"@6crypt.com",
"@seal.pm",
"@xolus.de",
"@cipher.pm",
];

return (
Expand Down
3 changes: 3 additions & 0 deletions components/aliases/addAliasDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const AddAliasDialog = ({ isOpen, closeModal, userInfo, refreshAliases }: any) =
},
body: JSON.stringify({
user_id: userInfo.user_id,
token: localStorage.getItem("jwt"),
}),
});

Expand All @@ -39,6 +40,7 @@ const AddAliasDialog = ({ isOpen, closeModal, userInfo, refreshAliases }: any) =
},
body: JSON.stringify({
user_id: userInfo.user_id,
token: localStorage.getItem("jwt"),
}),
});

Expand Down Expand Up @@ -90,6 +92,7 @@ const AddAliasDialog = ({ isOpen, closeModal, userInfo, refreshAliases }: any) =
aliasName: aliasName,
domain: selectedDomain,
goto: finalGoto,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
1 change: 1 addition & 0 deletions components/aliases/aliasCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const AliasCard = ({ userInfo, aliasName, domain, isActive, goto, refreshAliases
user_id: userInfo.user_id,
fqa: fqa,
alias_state: !isActive,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
2 changes: 2 additions & 0 deletions components/domains/addDomainDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const AddDomainDialog = ({ isOpen, closeModal, userInfo, userDetails, refreshDom
},
body: JSON.stringify({
domain: domain,
token: localStorage.getItem("jwt"),
}),
});

Expand All @@ -53,6 +54,7 @@ const AddDomainDialog = ({ isOpen, closeModal, userInfo, userDetails, refreshDom
body: JSON.stringify({
user_id: userInfo.user_id,
domain: domain,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
2 changes: 2 additions & 0 deletions components/domains/domainSettingsTopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const DomainSettingsTopBar = ({ domain_id, userInfo, userDetails, mailboxCount,
body: JSON.stringify({
user_id: userInfo.user_id,
domain_id: domain_id,
token: localStorage.getItem("jwt"),
}),
})
.then(async (res) => {
Expand Down Expand Up @@ -65,6 +66,7 @@ const DomainSettingsTopBar = ({ domain_id, userInfo, userDetails, mailboxCount,
body: JSON.stringify({
user_id: userInfo.user_id,
domain_id: domain_id,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
1 change: 1 addition & 0 deletions components/domains/enableCatchAllDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const enableCatchAll = async () => {
user_id: userInfo.user_id,
domain_id: domain_id,
forwarding_addresses: forwardingAddresses,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
4 changes: 3 additions & 1 deletion components/mailbox/addMailboxDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const AddMailboxDialog = ({ userInfo, isOpen, closeModal, domain, refreshMailbox
body: JSON.stringify({
username: formData.username,
domain: '@'+domain, // endpoint expects domain with @
token: localStorage.getItem("jwt"),
}),
})
.then((response) => response.json())
Expand Down Expand Up @@ -86,7 +87,8 @@ const AddMailboxDialog = ({ userInfo, isOpen, closeModal, domain, refreshMailbox
username: formData.username,
password: password,
confirm_password: confirmPassword,
quota: quota
quota: quota,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
1 change: 1 addition & 0 deletions components/mailbox/changeMailboxPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function ChangeMailboxPassword({ userInfo, domain_id, mailbox_id }: any) {
mailbox_id: mailbox_id,
currentPassword: currentPassword,
newPassword: newPassword,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
1 change: 1 addition & 0 deletions components/mailbox/changeMailboxQuota.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function ChangeMailboxQuota({ userInfo, userDetails, mailboxDetails, domain_id,
domain_id: domain_id,
mailbox_id: mailbox_id,
quota: event.target.quota.value,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
1 change: 1 addition & 0 deletions components/mailbox/mailboxSettingsTopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const MailboxSettingsTopBar = ({ userInfo, domain_id, mailbox_id, rateLimit }:
user_id: userInfo.user_id,
domain_id: domain_id,
mailbox_id: mailbox_id,
token: localStorage.getItem("jwt"),
}),
})
.then(async (res) => {
Expand Down
1 change: 1 addition & 0 deletions components/settings/apiAccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function ApiAccess({ userDetails, userApiDetails }: any) {
body: JSON.stringify({
user_id: userDetails.user_id,
api_access: !apiAccess,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
1 change: 1 addition & 0 deletions components/settings/changePassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function ChangePassword({ userInfo }: any) {
user_id: userInfo.user_id,
currentPassword: currentPassword,
newPassword: newPassword,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
3 changes: 3 additions & 0 deletions components/settings/privacySettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ function PrivacySettings({ userDetails, userInfo }: any) {
body: JSON.stringify({
user_id: userInfo.user_id,
password: password,
token: localStorage.getItem("jwt"),
}),
});

Expand Down Expand Up @@ -255,6 +256,7 @@ function PrivacySettings({ userDetails, userInfo }: any) {
body: JSON.stringify({
user_id: userInfo.user_id,
fast_login: !fastLogin,
token: localStorage.getItem("jwt"),
}),
});

Expand All @@ -281,6 +283,7 @@ function PrivacySettings({ userDetails, userInfo }: any) {
body: JSON.stringify({
user_id: userInfo.user_id,
beta_features: !betaFeatures,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
2 changes: 1 addition & 1 deletion components/settings/recovery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function accountRecovery({ userDetails, userInfo }: any) {
body: JSON.stringify({
user_id: userInfo.user_id,
enableRecovery: !enableRecovery,
recoveryCode: recoveryCodeHash
recoveryCode: recoveryCodeHash,
}),
});

Expand Down
3 changes: 3 additions & 0 deletions components/settings/twoFactorAuthSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function TwoFactorAuthentication({ userDetails, userInfo }: any) {
body: JSON.stringify({
user_id: userInfo.user_id,
secret: await encryptAuthPM(publicTotpSecret, password),
token: localStorage.getItem("jwt"),
}),
});

Expand Down Expand Up @@ -94,6 +95,7 @@ function TwoFactorAuthentication({ userDetails, userInfo }: any) {
},
body: JSON.stringify({
user_id: userInfo.user_id,
token: localStorage.getItem("jwt"),
}),
});

Expand Down Expand Up @@ -132,6 +134,7 @@ function TwoFactorAuthentication({ userDetails, userInfo }: any) {
body: JSON.stringify({
user_id: userInfo.user_id,
password: password,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
1 change: 1 addition & 0 deletions hooks/fetchUserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const useFetchUserInfo = () => {
},
body: JSON.stringify({
user_id: data.user_id,
token: localStorage.getItem("jwt"),
}),
});

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solun-auth",
"version": "0.3.60",
"version": "0.3.62",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
1 change: 1 addition & 0 deletions pages/subpages/aliases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const AliasesPage = () => {
},
body: JSON.stringify({
user_id: userInfo.user_id,
token: localStorage.getItem("jwt"),
}),
});
const data = await res.json();
Expand Down
2 changes: 2 additions & 0 deletions pages/subpages/domain_settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const DomainSettingsPage = ({ id }: DomainSettingsPageProps) => {
body: JSON.stringify({
user_id: userInfo.user_id,
domain_id: id,
token: localStorage.getItem("jwt"),
}),
});
const data = await res.json();
Expand All @@ -49,6 +50,7 @@ const DomainSettingsPage = ({ id }: DomainSettingsPageProps) => {
body: JSON.stringify({
user_id: userInfo.user_id,
domain_id: id,
token: localStorage.getItem("jwt"),
}),
});
const data = await res.json();
Expand Down
1 change: 1 addition & 0 deletions pages/subpages/domains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const DomainsPage = () => {
},
body: JSON.stringify({
user_id: userInfo.user_id,
token: localStorage.getItem("jwt"),
}),
});
const data = await res.json();
Expand Down
1 change: 1 addition & 0 deletions pages/subpages/mailbox_settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const MailboxSettingsPage = ({domain_id, mailbox_id}: MailboxSettingsPageProps)
user_id: userInfo.user_id,
domain_id: domain_id,
mailbox_id: mailbox_id,
token: localStorage.getItem("jwt"),
}),
});
const data = await res.json();
Expand Down
Loading