Skip to content

Commit 0c234dd

Browse files
authored
Merge pull request #379 from fccview/develop
Stable 1.19.1 - SECURITY UPDATE
2 parents 89b28d5 + 0628478 commit 0c234dd

19 files changed

Lines changed: 206 additions & 36 deletions

File tree

app/_components/FeatureComponents/Profile/Parts/LinksTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export const LinksTab = ({ linkIndex }: LinksTabProps) => {
319319

320320
<div className="bg-card border border-border rounded-md p-8">
321321
<div className="text-center space-y-4">
322-
<div className="text-6xl">🔗</div>
322+
<div className="text-6xl"><Link04Icon className="h-12 w-12" /></div>
323323
<div className="space-y-2">
324324
<h3 className="text-lg font-semibold">{t('profile.noLinksFound')}</h3>
325325
<p className="text-muted-foreground max-w-md mx-auto">

app/_server/actions/export/index.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { DATA_DIR, USERS_FILE, EXPORT_TEMP_DIR } from "@/app/_consts/files";
99
import { getAllLists } from "@/app/_server/actions/checklist";
1010
import { getAllNotes } from "@/app/_server/actions/note";
1111
import { readJsonFile, ensureDir } from "@/app/_server/actions/file";
12+
import { getCurrentUser, canAccessAllContent } from "@/app/_server/actions/users";
1213
import { User } from "@/app/_types";
1314
import { Modes } from "@/app/_types/enums";
1415

@@ -73,6 +74,14 @@ const zipDirectory = async (
7374
};
7475

7576
export const exportAllChecklistsNotes = async (): Promise<ExportResult> => {
77+
const hasAccess = await canAccessAllContent();
78+
if (!hasAccess) {
79+
return {
80+
success: false,
81+
error: "Forbidden: Admin access with content permissions required",
82+
};
83+
}
84+
7685
updateProgress(0, "Preparing all checklists and notes for export...");
7786
try {
7887
const tempExportPath = path.join(
@@ -146,6 +155,18 @@ export const exportAllChecklistsNotes = async (): Promise<ExportResult> => {
146155
export const exportUserChecklistsNotes = async (
147156
username: string
148157
): Promise<ExportResult> => {
158+
const currentUser = await getCurrentUser();
159+
if (!currentUser) {
160+
return { success: false, error: "Not authenticated" };
161+
}
162+
163+
if (username !== currentUser.username) {
164+
const hasAccess = await canAccessAllContent();
165+
if (!hasAccess) {
166+
return { success: false, error: "Forbidden: You can only export your own data" };
167+
}
168+
}
169+
149170
updateProgress(
150171
0,
151172
`Preparing ${username}'s checklists and notes for export...`
@@ -226,6 +247,14 @@ export const exportUserChecklistsNotes = async (
226247
};
227248

228249
export const exportAllUsersData = async (): Promise<ExportResult> => {
250+
const hasAccess = await canAccessAllContent();
251+
if (!hasAccess) {
252+
return {
253+
success: false,
254+
error: "Forbidden: Admin access with content permissions required",
255+
};
256+
}
257+
229258
updateProgress(0, "Preparing all user data for export...");
230259
try {
231260
const tempExportPath = path.join(
@@ -267,6 +296,14 @@ export const exportAllUsersData = async (): Promise<ExportResult> => {
267296
};
268297

269298
export const exportWholeDataFolder = async (): Promise<ExportResult> => {
299+
const hasAccess = await canAccessAllContent();
300+
if (!hasAccess) {
301+
return {
302+
success: false,
303+
error: "Forbidden: Admin access with content permissions required",
304+
};
305+
}
306+
270307
updateProgress(0, "Preparing the whole data folder for export...");
271308
try {
272309
const dataFolderPath = path.join(process.cwd(), DATA_DIR);

app/_translations/de.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@
578578
"visualizeRelationships": "Beziehungen zwischen deinen Notizen und Aufgabenlisten visualisieren",
579579
"connectedItems": "Verbundene Inhalte",
580580
"noLinksFound": "Keine Verbindungen gefunden",
581-
"startCreatingInternalLinks": "Benutze interne Verknüfungen in deinen Notizen und Aufgabenlisten, um das Netzwerk der Verknüpfungen hier zu sehen. Benutzer das Format",
581+
"startCreatingInternalLinks": "Beginnen Sie mit der Erstellung interner Links, indem Sie „@“ in Ihre Notizen eingeben, um das Beziehungsnetzwerk hier anzuzeigen.",
582582
"orFormat": "oder",
583583
"inYourContent": "in deinen Inhalten.",
584584
"highlyConnected": "stark verknüpft",
@@ -1471,4 +1471,4 @@
14711471
"actionInit": "Initialisiert",
14721472
"actionUnknown": "Geändert"
14731473
}
1474-
}
1474+
}

app/_translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@
620620
"visualizeRelationships": "Visualize relationships between your notes and checklists",
621621
"connectedItems": "Connected Items",
622622
"noLinksFound": "No Links Found",
623-
"startCreatingInternalLinks": "Start creating internal links in your notes and checklists to see the relationship network here. Use the format",
623+
"startCreatingInternalLinks": "Start creating internal links by typing `@` in your notes to see the relationship network here.",
624624
"orFormat": "or",
625625
"inYourContent": "in your content.",
626626
"highlyConnected": "highly connected",
@@ -1511,4 +1511,4 @@
15111511
"seenCount": "You've seen {count} {count, plural, one {haiku} other {haikus}}",
15121512
"imNoPoet": "I am no poet, and nor is Jotty. These are random words in sequence."
15131513
}
1514-
}
1514+
}

app/_translations/es.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@
591591
"visualizeRelationships": "Visualiza las relaciones entre sus notas y listas de verificación",
592592
"connectedItems": "Elementos conectados",
593593
"noLinksFound": "No se encontraron enlaces",
594-
"startCreatingInternalLinks": "Comience a crear enlaces internos en sus notas y listas de verificación para ver la red de relaciones aquí. Use el formato",
594+
"startCreatingInternalLinks": "Comience a crear enlaces internos escribiendo `@` en sus notas para ver la red de relaciones aquí.",
595595
"orFormat": "o",
596596
"inYourContent": "en su contenido.",
597597
"highlyConnected": "altamente conectado",
@@ -1494,4 +1494,4 @@
14941494
"actionInit": "Inicializado",
14951495
"actionUnknown": "Cambiado"
14961496
}
1497-
}
1497+
}

app/_translations/fr.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@
591591
"visualizeRelationships": "Visualisez les relations entre vos notes et listes",
592592
"connectedItems": "Éléments connectés",
593593
"noLinksFound": "Aucun lien trouvé",
594-
"startCreatingInternalLinks": "Commencez à créer des liens internes dans vos notes et listes pour voir le réseau de relations ici. Utilisez le format",
594+
"startCreatingInternalLinks": "Commencez à créer des liens internes en tapant « @ » dans vos notes pour voir le réseau relationnel ici.",
595595
"orFormat": "ou",
596596
"inYourContent": "dans votre contenu.",
597597
"highlyConnected": "très connecté",
@@ -1494,4 +1494,4 @@
14941494
"actionInit": "Initialisé",
14951495
"actionUnknown": "Modifié"
14961496
}
1497-
}
1497+
}

app/_translations/it.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@
591591
"visualizeRelationships": "Visualizza le relazioni tra le tue note e checklist",
592592
"connectedItems": "Elementi Connessi",
593593
"noLinksFound": "Nessun Link Trovato",
594-
"startCreatingInternalLinks": "Inizia a creare link interni nelle tue note e checklist per vedere la rete di relazioni qui. Usa il formato",
594+
"startCreatingInternalLinks": "Inizia a creare collegamenti interni digitando \"@\" nelle tue note per vedere la rete di relazioni qui.",
595595
"orFormat": "o",
596596
"inYourContent": "nel tuo contenuto.",
597597
"highlyConnected": "altamente connesso",
@@ -1495,4 +1495,4 @@
14951495
"actionInit": "Inizializzato",
14961496
"actionUnknown": "Modificato"
14971497
}
1498-
}
1498+
}

app/_translations/klingon.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@
620620
"visualizeRelationships": "ghItlhmey 'ej tetlhmey rar yIlegh",
621621
"connectedItems": "Dochmey rar",
622622
"noLinksFound": "lI'mey tu'be'lu'",
623-
"startCreatingInternalLinks": "ghItlhDaq 'ej tetlhDaq lI'mey yIchenmoH. mIwvam yIlo':",
623+
"startCreatingInternalLinks": "Start creating internal links by typing `@` in your notes to see the relationship network here.",
624624
"orFormat": "pagh",
625625
"inYourContent": "De'lIjDaq.",
626626
"highlyConnected": "rarqu'",
@@ -1515,4 +1515,4 @@
15151515
"seenCount": "{count} haiku Dalegh",
15161516
"imNoPoet": "bomwI' jIHbe'. mu'mey neH."
15171517
}
1518-
}
1518+
}

app/_translations/ko.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@
612612
"visualizeRelationships": "노트와 체크리스트 간의 관계를 시각화합니다",
613613
"connectedItems": "연결된 항목",
614614
"noLinksFound": "링크를 찾을 수 없습니다",
615-
"startCreatingInternalLinks": "이곳에서 관계 네트워크를 확인하려면 노트와 체크리스트에 내부 링크를 추가하세요. 다음 형식을 사용하세요",
615+
"startCreatingInternalLinks": "여기에서 관계 네트워크를 보려면 노트에 `@`를 입력하여 내부 링크 만들기를 시작하세요.",
616616
"orFormat": "또는",
617617
"inYourContent": "콘텐츠에서.",
618618
"highlyConnected": "연결 많음",
@@ -1500,4 +1500,4 @@
15001500
"seenCount": "{count} {count, plural, one {하이쿠} other {하이쿠}} 를 보았습니다",
15011501
"imNoPoet": "저는 시인이 아니며 Jotty도 마찬가지입니다. 이는 무작위로 나열된 단어들입니다."
15021502
}
1503-
}
1503+
}

app/_translations/nl.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@
591591
"visualizeRelationships": "Visualiseer relaties tussen uw notities en checklists",
592592
"connectedItems": "Verbonden items",
593593
"noLinksFound": "Geen links gevonden",
594-
"startCreatingInternalLinks": "Begin met het maken van interne links in uw notities en checklists om het relatienetwerk hier te zien. Gebruik het formaat",
594+
"startCreatingInternalLinks": "Begin met het maken van interne links door `@` in uw notities te typen om het relatienetwerk hier te zien.",
595595
"orFormat": "of",
596596
"inYourContent": "in uw inhoud.",
597597
"highlyConnected": "sterk verbonden",
@@ -1470,4 +1470,4 @@
14701470
"seenCount": "U heeft {count} {count, plural, one {haiku} other {haiku's}} gezien",
14711471
"imNoPoet": "Ik ben geen dichter, en Jotty ook niet. Dit zijn willekeurige woorden op een rij."
14721472
}
1473-
}
1473+
}

0 commit comments

Comments
 (0)