chore: 🎨 format

This commit is contained in:
ThatOneCalculator 2023-07-17 17:38:27 -07:00
parent aa7d16febb
commit b54dfff32f
No known key found for this signature in database
GPG key ID: 8703CACD01000000
5 changed files with 15 additions and 10 deletions

View file

@ -46,7 +46,7 @@ function processMastoFile(fn: string, path: string, dir: string, uid: string) {
for (const note of outbox.orderedItems) { for (const note of outbox.orderedItems) {
for (const attachment of note.object.attachment) { for (const attachment of note.object.attachment) {
const url = attachment.url.replaceAll("..", ""); const url = attachment.url.replaceAll("..", "");
if (url.indexOf('\0') !== -1) { if (url.indexOf("\0") !== -1) {
logger.error(`Found Poison Null Bytes Attack: ${url}`); logger.error(`Found Poison Null Bytes Attack: ${url}`);
reject(); reject();
return; return;

View file

@ -16,7 +16,10 @@ async function getRelMeLinks(url: string): Promise<string[]> {
} }
} }
export async function verifyLink(link: string, username: string): Promise<boolean> { export async function verifyLink(
link: string,
username: string,
): Promise<boolean> {
let verified = false; let verified = false;
if (link.startsWith("http")) { if (link.startsWith("http")) {
const relMeLinks = await getRelMeLinks(link); const relMeLinks = await getRelMeLinks(link);

View file

@ -61,11 +61,13 @@
<div class="buttons"> <div class="buttons">
<button <button
v-if="media.comment" v-if="media.comment"
v-tooltip.noLabel="`${i18n.ts.alt}: ${ v-tooltip.noLabel="
media.comment.length > 200 ? `${i18n.ts.alt}: ${
media.comment.trim().slice(0, 200) + '...' media.comment.length > 200
: media.comment.trim() ? media.comment.trim().slice(0, 200) + '...'
}`" : media.comment.trim()
}`
"
:aria-label="i18n.ts.alt" :aria-label="i18n.ts.alt"
class="_button" class="_button"
@click.stop="captionPopup" @click.stop="captionPopup"

View file

@ -127,8 +127,8 @@
</FormFolder> </FormFolder>
<template #caption>{{ <template #caption>{{
i18n.t("_profile.metadataDescription", { i18n.t("_profile.metadataDescription", {
a: '<code><a></code>', a: '\<code\>\<a\>\</code\>',
l: '<code><a></code>', l: '\<code\>\<a\>\</code\>',
rel: `rel="me" href="https://${host}/@${$i.username}"` rel: `rel="me" href="https://${host}/@${$i.username}"`
}) })
}}</template> }}</template>

View file

@ -755,7 +755,7 @@ onUnmounted(() => {
margin-bottom: 8px; margin-bottom: 8px;
} }
&.verified { &.verified {
background-color: var(--hover); background-color: var(--hover);
border-radius: 10px; border-radius: 10px;
color: var(--badge) !important; color: var(--badge) !important;