mirror of
https://github.com/diced/zipline.git
synced 2025-12-12 15:50:11 -08:00
Compare commits
3 Commits
01a73df7f3
...
83246d6a4b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83246d6a4b | ||
|
|
ac41dab2b2 | ||
|
|
26661f7a83 |
@@ -25,7 +25,7 @@ import { createRoutes } from './routes';
|
|||||||
|
|
||||||
export const getFile = async (id: string) =>
|
export const getFile = async (id: string) =>
|
||||||
prisma.file.findFirst({
|
prisma.file.findFirst({
|
||||||
where: { name: id as string },
|
where: { name: decodeURIComponent(id) },
|
||||||
select: {
|
select: {
|
||||||
...fileSelect,
|
...fileSelect,
|
||||||
password: true,
|
password: true,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
import { settingsOnSubmit } from '../settingsOnSubmit';
|
import { settingsOnSubmit } from '../settingsOnSubmit';
|
||||||
|
|
||||||
const DOMAIN_REGEX =
|
const DOMAIN_REGEX =
|
||||||
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$/gim;
|
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,30})$/gim;
|
||||||
|
|
||||||
export default function Domains({
|
export default function Domains({
|
||||||
swr: { data, isLoading },
|
swr: { data, isLoading },
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ export function useTitle(title?: string) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!data || error || isLoading) return;
|
if (!data || error || isLoading) return;
|
||||||
document.title = title ? `${data.website.title} – ${title}` : data.website.title || 'Zipline';
|
document.title = title ? `${data.website.title} – ${title}` : data.website.title || 'Zipline';
|
||||||
}, [title, location]);
|
}, [title, location, data, isLoading]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ export default fastifyPlugin(
|
|||||||
z
|
z
|
||||||
.string()
|
.string()
|
||||||
.regex(
|
.regex(
|
||||||
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$/gi,
|
/^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,30})$/gi,
|
||||||
'Invalid Domain',
|
'Invalid Domain',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user