Security fixes

Co-Authored-By: dakkar <dakkar@thenautilus.net>
This commit is contained in:
Julia Johannesen 2025-04-27 13:05:09 -04:00
parent 9e13c375c5
commit 0bb4e57b0c
No known key found for this signature in database
GPG key ID: 4A1377AF3E7FBC46
14 changed files with 56 additions and 26 deletions

View file

@ -496,9 +496,7 @@ export class ApRendererService {
const attachment = profile.fields.map(field => ({
type: 'PropertyValue',
name: field.name,
value: (field.value.startsWith('http://') || field.value.startsWith('https://'))
? `<a href="${new URL(field.value).href}" rel="me nofollow noopener" target="_blank">${new URL(field.value).href}</a>`
: field.value,
value: this.mfmService.toHtml(mfm.parse(field.value)),
}));
const emojis = await this.getEmojis(user.emojis);