Skip to content

Commit

Permalink
Merge branch 'develop_mashiro-site' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AyumuNekozuki authored Feb 16, 2024
2 parents c75057c + 4c3674c commit 7f3d8c7
Show file tree
Hide file tree
Showing 20 changed files with 185 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

patreon: syuilo
patreon: AyumuNekozuki
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,86 @@ Meilisearchの設定に`index`が必要になりました。値はMisskeyサー
### Improvements
- ロールで広告の非表示が有効になっている場合は最初から広告を非表示にするように

## 13.5.3 (2023/02/09)

### Improvements
- Client: デッキにチャンネルカラムを追加

## 13.5.2 (2023/02/08)

### Changes
- Revert: perf(client): do not render custom emojis in user names

### Bugfixes
- Client: register_note_view_interruptor not working
- Client: ログイントークンの再生成が出来ない

## 13.5.0 (2023/02/08)

### Changes
- perf(client): do not render custom emojis in user names

### Improvements
- Client: disableShowingAnimatedImagesのデフォルト値をprefers-reduced-motionにする
- enhance(client): tweak medialist style

### Bugfixes
- fix docker health check
- Client: MkEmojiPickerでもChromeで検索ダイアログで変換確定するとそのまま検索されてしまうのを修正
- fix(mfm): default degree not used in rotate
- fix(server): validate urls from ap to improve security

## 13.4.0 (2023/02/05)

### Improvements
- ロールにアイコンを設定してユーザー名の横に表示できるように
- feat: timeline page for non-login users
- 実績の単なるラッキーの獲得確立を調整
- Add Thai language support

### Bugfixes
- fix(server): 自分のノートをお気に入りに登録しても実績解除される問題を修正
- fix(server): clean up file in FileServer
- fix(server): Deny UNIX domain socket
- fix(server): validate filename and emoji name to improve security
- fix(client): validate input response in aiscript
- fix(client): add webhook delete button
- fix(client): tweak notification style
- fix(client): インラインコードを折り返して表示する

## 13.3.3 (2023/02/04)

### Bugfixes
- Server: improve security

## 13.3.2 (2023/02/04)

### Improvements
- 外部メディアプロキシへの対応を強化しました
外部メディアプロキシのFastify実装を作りました
https://github.com/misskey-dev/media-proxy
- Server: improve performance

### Bugfixes
- Client: validate urls to improve security

## 13.3.1 (2023/02/04)

### Bugfixes
- Client: カスタム絵文字にアニメーション画像を再生しない設定が適用されていない問題を修正
- Client: オートコンプリートでUnicode絵文字がカスタム絵文字として表示されてしまうのを修正
- Client: Fix Vue-plyr CORS issue
- Client: validate urls to improve security

## 13.3.0 (2023/02/03)
### Changes
- twitter/github/discord連携機能が削除されました
- ハッシュタグごとのチャートが削除されました
- syslogのサポートが削除されました

### Improvements
- ロールで広告の非表示が有効になっている場合は最初から広告を非表示にするように

## 13.2.6 (2023/02/01)
### Changes
- docker-compose.ymlをdocker-compose.yml.exampleにしました。docker-compose.ymlとしてコピーしてから使用してください。
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<a href="https://mi.mashiro.site/">
<img src="https://github.com/AyumuNekozuki/AyumuNekozuki/blob/master/header.png?raw=true" />
</a>

---

<div align="center">
<a href="https://misskey-hub.net">
<img src="./assets/title_float.svg" alt="Misskey logo" style="border-radius:50%" width="400"/>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "misskey",
"version": "2024.2.0-beta.12",
"version": "2024.2.0-beta.12-mashiro.6",
"codename": "nasubi",
"repository": {
"type": "git",
"url": "https://github.com/misskey-dev/misskey.git"
"url": "https://github.com/AyumuNekozuki/misskey.git"
},
"packageManager": "[email protected]",
"workspaces": [
Expand Down
Binary file modified packages/backend/assets/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/backend/assets/favicon.ico
Binary file not shown.
Binary file modified packages/backend/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/backend/assets/icons/192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/backend/assets/icons/300.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/backend/assets/icons/500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/backend/assets/icons/512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/backend/src/core/entities/DriveFileEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ export class DriveFileEntityService {

@bindThis
private getProxiedUrl(url: string, mode?: 'static' | 'avatar'): string {
// みすほわ独自: 動画であればproxyさせない
if (url.endsWith('.mp4') || url.endsWith('.mov') || url.endsWith('.m4v') || url.endsWith('.3gp')) {
return url;
}

return appendQuery(
`${this.config.mediaProxy}/${mode ?? 'image'}.webp`,
query({
Expand Down
33 changes: 21 additions & 12 deletions packages/backend/src/queue/processors/InboxProcessorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ export class InboxProcessorService {
private instanceChart: InstanceChart,
private apRequestChart: ApRequestChart,
private federationChart: FederationChart,
private queueLoggerService: QueueLoggerService,
private queueLoggerService: QueueLoggerService
) {
this.logger = this.queueLoggerService.logger.createSubLogger('inbox');
this.logger = this.queueLoggerService.logger.createSubLogger("inbox");
}

@bindThis
public async process(job: Bull.Job<InboxJobData>): Promise<string> {
const signature = job.data.signature; // HTTP-signature
const signature = job.data.signature; // HTTP-signature
const activity = job.data.activity;

//#region Log
const info = Object.assign({}, activity);
delete info['@context'];
delete info["@context"];
this.logger.debug(JSON.stringify(info, null, 2));
//#endregion

Expand All @@ -68,7 +68,7 @@ export class InboxProcessorService {
}

const keyIdLower = signature.keyId.toLowerCase();
if (keyIdLower.startsWith('acct:')) {
if (keyIdLower.startsWith("acct:")) {
return `Old keyId is no longer supported. ${keyIdLower}`;
}

Expand All @@ -81,7 +81,9 @@ export class InboxProcessorService {
// keyIdでわからなければ、activity.actorを元にDBから取得 || activity.actorを元にリモートから取得
if (authUser == null) {
try {
authUser = await this.apDbResolverService.getAuthUserFromApId(getApId(activity.actor));
authUser = await this.apDbResolverService.getAuthUserFromApId(
getApId(activity.actor)
);
} catch (err) {
// 対象が4xxならスキップ
if (err instanceof StatusError) {
Expand All @@ -104,7 +106,10 @@ export class InboxProcessorService {
}

// HTTP-Signatureの検証
const httpSignatureValidated = httpSignature.verifySignature(signature, authUser.key.keyPem);
const httpSignatureValidated = httpSignature.verifySignature(
signature,
authUser.key.keyPem
);

// また、signatureのsignerは、activity.actorと一致する必要がある
if (!httpSignatureValidated || authUser.user.uri !== activity.actor) {
Expand All @@ -117,12 +122,14 @@ export class InboxProcessorService {
// activity.signature.creator: https://example.oom/users/user#main-key
// みたいになっててUserを引っ張れば公開キーも入ることを期待する
if (activity.signature.creator) {
const candicate = activity.signature.creator.replace(/#.*/, '');
const candicate = activity.signature.creator.replace(/#.*/, "");
await this.apPersonService.resolvePerson(candicate).catch(() => null);
}

// keyIdからLD-Signatureのユーザーを取得
authUser = await this.apDbResolverService.getAuthUserFromKeyId(activity.signature.creator);
authUser = await this.apDbResolverService.getAuthUserFromKeyId(
activity.signature.creator
);
if (authUser == null) {
throw new Bull.UnrecoverableError('skip: LD-Signatureのユーザーが取得できませんでした');
}
Expand All @@ -133,7 +140,9 @@ export class InboxProcessorService {

// LD-Signature検証
const ldSignature = this.ldSignatureService.use();
const verified = await ldSignature.verifyRsaSignature2017(activity, authUser.key.keyPem).catch(() => false);
const verified = await ldSignature
.verifyRsaSignature2017(activity, authUser.key.keyPem)
.catch(() => false);
if (!verified) {
throw new Bull.UnrecoverableError('skip: LD-Signatureの検証に失敗しました');
}
Expand All @@ -154,7 +163,7 @@ export class InboxProcessorService {
}

// activity.idがあればホストが署名者のホストであることを確認する
if (typeof activity.id === 'string') {
if (typeof activity.id === "string") {
const signerHost = this.utilityService.extractDbHost(authUser.user.uri!);
const activityIdHost = this.utilityService.extractDbHost(activity.id);
if (signerHost !== activityIdHost) {
Expand All @@ -181,6 +190,6 @@ export class InboxProcessorService {

// アクティビティを処理
await this.apInboxService.performActivity(authUser.user, activity);
return 'ok';
return "ok";
}
}
6 changes: 3 additions & 3 deletions packages/backend/src/server/web/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Misskey",
"name": "Misskey",
"short_name": "みすほわいと",
"name": "みすほわいと",
"start_url": "/",
"display": "standalone",
"background_color": "#313a42",
Expand All @@ -19,7 +19,7 @@
"purpose": "maskable"
},
{
"src": "/static-assets/splash.png",
"src": "/static-assets/icons/300.png",
"sizes": "300x300",
"type": "image/png",
"purpose": "any"
Expand Down
9 changes: 8 additions & 1 deletion packages/frontend/src/components/MkVisitorDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<div v-html="meta.description || i18n.ts.headlineMisskey"></div>
</div>
<div v-if="instance.disableRegistration" :class="$style.mainWarn">
<MkInfo warn>{{ i18n.ts.invitationRequiredToRegister }}</MkInfo>
<MkInfo warn><br />
現在、このサーバーは招待制です。<br />
登録には招待コードが必要です。<br />
<br />
招待コードはすでに登録済みのご友人から受け取るか、<br />
<MkLink target="_blank" url="https://mi-mashiro-site.notion.site/fa6a351d51c94223b9f394000cbe3fa8?pvs=4">こちら</MkLink>から使えるコードを探して利用してください。
<!-- {{ i18n.ts.invitationRequiredToRegister }} -->
</MkInfo>
</div>
<div class="_gaps_s" :class="$style.mainActions">
<MkButton :class="$style.mainAction" full rounded gradate data-cy-signup style="margin-right: 12px;" @click="signup()">{{ i18n.ts.joinThisServer }}</MkButton>
Expand Down
73 changes: 44 additions & 29 deletions packages/frontend/src/pages/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,50 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</div>

<MkKeyValue>
<template #key>{{ i18n.ts.description }}</template>
<template #value><div v-html="instance.description"></div></template>
</MkKeyValue>

<FormSection>
<div class="_gaps_m">
<MkKeyValue :copy="version">
<template #key>Misskey</template>
<template #value>{{ version }}</template>
</MkKeyValue>
<div v-html="i18n.tsx.poweredByMisskeyDescription({ name: instance.name ?? host })">
</div>
<FormLink to="/about-misskey">{{ i18n.ts.aboutMisskey }}</FormLink>
</div>
</FormSection>

<FormSection>
<div class="_gaps_m">
<FormSplit>
<MkKeyValue>
<template #key>{{ i18n.ts.administrator }}</template>
<template #value>{{ instance.maintainerName }}</template>
</MkKeyValue>
<MkKeyValue>
<template #key>{{ i18n.ts.contact }}</template>
<template #value>{{ instance.maintainerEmail }}</template>
</MkKeyValue>
</FormSplit>
<MkKeyValue>

Check failure on line 21 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs

Check failure on line 21 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs
<template #key>{{ i18n.ts.description }}</template>

Check failure on line 22 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs

Check failure on line 22 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs
<template #value><div v-html="instance.description"></div></template>

Check failure on line 23 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs

Check failure on line 23 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs
</MkKeyValue>

Check failure on line 24 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs

Check failure on line 24 in packages/frontend/src/pages/about.vue

View workflow job for this annotation

GitHub Actions / lint (frontend)

Mixed spaces and tabs

<FormSection>
<div class="_gaps_m">
<div v-html="i18n.t('poweredByMisskeyDescription', { name: instance.name ?? host })">
</div>
<FormLink to="/about-misskey">{{ i18n.ts.aboutMisskey }}</FormLink>
</div>
</FormSection>

<FormSection>
<div class="_gaps_m">
<MkKeyValue :copy="version">
<template #key>みすほわいと</template>
<template #value>v{{ version }}</template>
</MkKeyValue>
<FormLink to="https://github.com/AyumuNekozuki/misskey" external>
<template #icon><i class="ti ti-code"></i></template>
{{ i18n.ts._aboutMisskey.source }}
<template #suffix>GitHub</template>
</FormLink>
<FormLink to="https://www.patreon.com/AyumuNekozuki" external>
<template #icon><i class="ti ti-pig-money"></i></template>
サーバー代支援
<template #suffix>Patreon</template>
</FormLink>
</div>
</FormSection>

<FormSection>
<div class="_gaps_m">
<FormSplit>
<MkKeyValue>
<template #key>{{ i18n.ts.administrator }}</template>
<template #value>{{ instance.maintainerName }}</template>
</MkKeyValue>
<MkKeyValue>
<template #key>{{ i18n.ts.contact }}</template>
<template #value>{{ instance.maintainerEmail }}</template>
</MkKeyValue>
</FormSplit>
<FormLink v-if="instance.impressumUrl" :to="instance.impressumUrl" external>{{ i18n.ts.impressum }}</FormLink>
<div class="_gaps_s">
<MkFolder v-if="instance.serverRules.length > 0">
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ const headerTabsWhenNotLogin = computed(() => [
icon: 'ti ti-whirl',
iconOnly: true,
}] : []),
] as Tab[]);
]);

definePageMetadata(computed(() => ({
title: i18n.ts.timeline,
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/welcome.entrance.a.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ misskeyApiGet('federation/instances', {
position: fixed;
top: 0;
right: 0;
width: 80vw; // 100%からshapeの幅を引いている
width: 85vw; // 100%からshapeの幅を引いている
height: 100vh;
}

Expand All @@ -82,7 +82,7 @@ misskeyApiGet('federation/instances', {
right: 64px;
margin: auto;
padding: 128px 0;
width: 500px;
width: 300px;
height: calc(100% - 256px);
overflow: hidden;
-webkit-mask-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 128px, rgba(0,0,0,1) calc(100% - 128px), rgba(0,0,0,0) 100%);
Expand Down
5 changes: 5 additions & 0 deletions packages/frontend/src/scripts/media-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export function getProxiedImageUrl(imageUrl: string, type?: 'preview' | 'emoji'
imageUrl = (new URL(imageUrl)).searchParams.get('url') ?? imageUrl;
}

// みすほわ独自: 動画であればproxyさせない
if (imageUrl.endsWith('.mp4') || imageUrl.endsWith('.mov') || imageUrl.endsWith('.m4v') || imageUrl.endsWith('.3gp')) {
return imageUrl;
}

return `${mustOrigin ? localProxy : instance.mediaProxy}/${
type === 'preview' ? 'preview.webp'
: 'image.webp'
Expand Down
8 changes: 7 additions & 1 deletion packages/frontend/src/ui/_common_/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ export function openInstanceMenu(ev: MouseEvent) {
window.open(instance.privacyPolicyUrl, '_blank', 'noopener');
},
} : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : { type: 'divider' }, {
text: i18n.ts.help,
text: `みすほわいと ${i18n.ts.help}`,
icon: 'ti ti-help-circle',
action: () => {
window.open('https://mi-mashiro-site.notion.site/mi-mashiro-site/de158e06de974157893a4790472e2f1e', '_blank');
},
}, {
text: `Misskey ${i18n.ts.help}`,
icon: 'ti ti-help-circle',
action: () => {
window.open('https://misskey-hub.net/docs/for-users/', '_blank', 'noopener');
Expand Down

1 comment on commit 7f3d8c7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chromatic detects changes. Please review the changes on Chromatic.

Please sign in to comment.