1
0
forked from mirror/misskey

Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop

This commit is contained in:
syuilo 2021-05-23 21:14:44 +09:00
commit 6cc4edc5e8
4 changed files with 24 additions and 19 deletions

View File

@ -21,6 +21,7 @@ const languages = [
'en-US', 'en-US',
'es-ES', 'es-ES',
'fr-FR', 'fr-FR',
'id-ID',
'ja-JP', 'ja-JP',
'ja-KS', 'ja-KS',
'kab-KAB', 'kab-KAB',

View File

@ -146,6 +146,7 @@ hr {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: var(--modalBg); background: var(--modalBg);
-webkit-backdrop-filter: var(--modalBgFilter);
backdrop-filter: var(--modalBgFilter); backdrop-filter: var(--modalBgFilter);
} }

View File

@ -104,22 +104,25 @@ export default define(meta, async (ps, me) => {
generateVisibilityQuery(query, me); generateVisibilityQuery(query, me);
if (me) generateMutedUserQuery(query, me); if (me) generateMutedUserQuery(query, me);
if (ps.tag) { try {
if (!safeForSql(ps.tag)) return; if (ps.tag) {
query.andWhere(`'{"${normalizeForSearch(ps.tag)}"}' <@ note.tags`); if (!safeForSql(ps.tag)) throw 'Injection';
} else { query.andWhere(`'{"${normalizeForSearch(ps.tag)}"}' <@ note.tags`);
let i = 0; } else {
query.andWhere(new Brackets(qb => { query.andWhere(new Brackets(qb => {
for (const tags of ps.query!) { for (const tags of ps.query!) {
qb.orWhere(new Brackets(qb => { qb.orWhere(new Brackets(qb => {
for (const tag of tags) { for (const tag of tags) {
if (!safeForSql(tag)) return; if (!safeForSql(tag)) throw 'Injection';
qb.andWhere(`'{"${normalizeForSearch(ps.tag)}"}' <@ note.tags`); qb.andWhere(`'{"${normalizeForSearch(tag)}"}' <@ note.tags`);
i++; }
} }));
})); }
} }));
})); }
} catch (e) {
if (e === 'Injection') return [];
throw e;
} }
if (ps.reply != null) { if (ps.reply != null) {

View File

@ -1536,9 +1536,9 @@ acorn@^8.2.1:
integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==
agent-base@6: agent-base@6:
version "6.0.0" version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
integrity sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw== integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
dependencies: dependencies:
debug "4" debug "4"