Merge branch 'master' into feature/noid/push

feature/noid/sql-rewrite-0929
Maxence Lange 2019-08-22 12:46:49 -01:00 zatwierdzone przez GitHub
commit 704a964bd5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
10 zmienionych plików z 1986 dodań i 1146 usunięć

Wyświetl plik

@ -1,7 +1,13 @@
@include icon-black-white('reply', 'social', 1);
@include icon-black-white('emoji', 'social', 1);
@include icon-black-white('boost', 'social', 1);
.icon-boosted {
@include icon-color('boost', 'social', '#0082c9', 1);
}
img.emoji {
margin: 3px;
width: 16px;
vertical-align: text-bottom;
}

Wyświetl plik

@ -3,6 +3,9 @@ OC.L10N.register(
{
"Social" : "Social",
"🎉 Nextcloud becomes part of the federated social networks!" : "¡🎉 Nextcloud pasa a ser parte de las redes sociales federadas!",
"** Disclaimer: this is an ALPHA version **\n\n**🎉 Nextcloud becomes part of the federated social networks!**\n\n**🙋 Find your friends:** No matter if they use Nextcloud, 🐘 Mastodon, 🇫 Friendica, and soon ✱ Diaspora, 👹 MediaGoblin and more – you can follow them!\n\n**📜 Profile info:** No need to fill out more profiles – your info from Nextcloud will be used and extended.\n\n**👐 Own your posts:** Everything you post stays on your Nextcloud!\n\n**🕸 Open standards:** We use the established ActivityPub standard!" : "** AVISO: Esta es una versión ALFA **\n\n**¡🎉 Nextcloud pasa a ser parte de las redes sociales federadas!**\n\n**🙋 Encuentra a tus amigos:** No importa si usan Nextcloud, 🐘 Mastodon, 🇫 Friendica, y pronto ✱ Diaspora, 👹 MediaGoblin y más, ¡Puedes seguirlos a todos!\n\n**📜 Información de perfil:** Sin necesidad de rellenar más perfiles – se usará y extenderá la información de tu perfil de Nextcloud. \n\n**👐 Sé el dueño de tu material:** ¡Todo lo que cuelgues permanece en tu Nextcloud!\n\n**🕸 Estándares abiertos:** ¡Usamos el estándar establecido ActivityPub! ",
".well-known/webfinger isn't properly set up!" : ".well-known/webfinger no está bien configurado",
"Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can't configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: " : "Social necesita que el descubrimiento automático de .well-known esté bien configurado. Si Nextcloud no está instalado en la raíz del dominio, a menudo se da el caso de que Nextcloud no puede configurarlo automáticamente. Para usar Social, el administrador de esta instancia de Netcloud debe configurar manualmente las redirecciones .well-known:",
"Open documentation" : "Abrir la documentación",
"Social app setup" : "Configuración de la app Social",
"ActivityPub requires a fixed URL to make entries unique. Note that this can not be changed later without resetting the Social app." : "ActivityPub necesita una URL fija para hacer únicas las entradas. Nota: esto no puede cambiarse más tarde sin reiniciar la app Social.",
@ -37,6 +40,7 @@ OC.L10N.register(
"No results found" : "No se han encontrado resultados",
"There were no results for your search:" : "No ha habido resultados para tu búsqueda:",
"Searching for" : "Buscando",
"boosted" : "reforzado",
"No posts found" : "No se han encontrado entradas",
"Posts from people you follow will show up here" : "Las entradas de gente a la que sigues aparecerán aquí",
"No direct messages found" : "No se han encontrado mensajes directos",
@ -45,8 +49,10 @@ OC.L10N.register(
"Posts from other people on this instance will show up here" : "Las entradas de otras personas en esta instancia aparecerán aquí",
"No global posts found" : "No se han encontrado entradas globales",
"Posts from federated instances will show up here" : "Las entradas de instancias federadas aparecerán aquí",
"No liked posts found" : "No se han encontrado entradas con Me gusta",
"No posts found for this tag" : "No se han encontrado post para este tag",
"Reply" : "Responder",
"Boost" : "Refuerzo",
"Like" : "Me gusta",
"More actions" : "Más acciones",
"Delete post" : "Borrar post",

Wyświetl plik

@ -1,6 +1,9 @@
{ "translations": {
"Social" : "Social",
"🎉 Nextcloud becomes part of the federated social networks!" : "¡🎉 Nextcloud pasa a ser parte de las redes sociales federadas!",
"** Disclaimer: this is an ALPHA version **\n\n**🎉 Nextcloud becomes part of the federated social networks!**\n\n**🙋 Find your friends:** No matter if they use Nextcloud, 🐘 Mastodon, 🇫 Friendica, and soon ✱ Diaspora, 👹 MediaGoblin and more – you can follow them!\n\n**📜 Profile info:** No need to fill out more profiles – your info from Nextcloud will be used and extended.\n\n**👐 Own your posts:** Everything you post stays on your Nextcloud!\n\n**🕸 Open standards:** We use the established ActivityPub standard!" : "** AVISO: Esta es una versión ALFA **\n\n**¡🎉 Nextcloud pasa a ser parte de las redes sociales federadas!**\n\n**🙋 Encuentra a tus amigos:** No importa si usan Nextcloud, 🐘 Mastodon, 🇫 Friendica, y pronto ✱ Diaspora, 👹 MediaGoblin y más, ¡Puedes seguirlos a todos!\n\n**📜 Información de perfil:** Sin necesidad de rellenar más perfiles – se usará y extenderá la información de tu perfil de Nextcloud. \n\n**👐 Sé el dueño de tu material:** ¡Todo lo que cuelgues permanece en tu Nextcloud!\n\n**🕸 Estándares abiertos:** ¡Usamos el estándar establecido ActivityPub! ",
".well-known/webfinger isn't properly set up!" : ".well-known/webfinger no está bien configurado",
"Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can't configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: " : "Social necesita que el descubrimiento automático de .well-known esté bien configurado. Si Nextcloud no está instalado en la raíz del dominio, a menudo se da el caso de que Nextcloud no puede configurarlo automáticamente. Para usar Social, el administrador de esta instancia de Netcloud debe configurar manualmente las redirecciones .well-known:",
"Open documentation" : "Abrir la documentación",
"Social app setup" : "Configuración de la app Social",
"ActivityPub requires a fixed URL to make entries unique. Note that this can not be changed later without resetting the Social app." : "ActivityPub necesita una URL fija para hacer únicas las entradas. Nota: esto no puede cambiarse más tarde sin reiniciar la app Social.",
@ -35,6 +38,7 @@
"No results found" : "No se han encontrado resultados",
"There were no results for your search:" : "No ha habido resultados para tu búsqueda:",
"Searching for" : "Buscando",
"boosted" : "reforzado",
"No posts found" : "No se han encontrado entradas",
"Posts from people you follow will show up here" : "Las entradas de gente a la que sigues aparecerán aquí",
"No direct messages found" : "No se han encontrado mensajes directos",
@ -43,8 +47,10 @@
"Posts from other people on this instance will show up here" : "Las entradas de otras personas en esta instancia aparecerán aquí",
"No global posts found" : "No se han encontrado entradas globales",
"Posts from federated instances will show up here" : "Las entradas de instancias federadas aparecerán aquí",
"No liked posts found" : "No se han encontrado entradas con Me gusta",
"No posts found for this tag" : "No se han encontrado post para este tag",
"Reply" : "Responder",
"Boost" : "Refuerzo",
"Like" : "Me gusta",
"More actions" : "Más acciones",
"Delete post" : "Borrar post",

Wyświetl plik

@ -3,11 +3,11 @@ OC.L10N.register(
{
"🎉 Nextcloud becomes part of the federated social networks!" : "🎉 Nextcloudは分散ソーシャルネットワークの一部になります",
"** Disclaimer: this is an ALPHA version **\n\n**🎉 Nextcloud becomes part of the federated social networks!**\n\n**🙋 Find your friends:** No matter if they use Nextcloud, 🐘 Mastodon, 🇫 Friendica, and soon ✱ Diaspora, 👹 MediaGoblin and more – you can follow them!\n\n**📜 Profile info:** No need to fill out more profiles – your info from Nextcloud will be used and extended.\n\n**👐 Own your posts:** Everything you post stays on your Nextcloud!\n\n**🕸 Open standards:** We use the established ActivityPub standard!" : "** 免責事項:これはアルファ版です **\n\n** 🎉 Nextcloudは分散型ソーシャルネットワークの一部になります**\n\n**🙋友達を探す:** Nextcloud、Mastodon、Friendica、近日中にはDiaspora、MediaGoblinなどを使用していてもフォローすることができます\n\n** プロフィール情報:**これ以上プロフィールを記入する必要はありません - Nextcloudからのあなたの情報は使用され、広がってゆきます。\n\n**👐自分の投稿:**投稿したものはすべてNextcloudに残ります\n\n**オープンスタンダード:**確立されたActivityPub形式を使用しています",
".well-known/webfinger isn't properly set up!" : ".well-known / webfingerが正しく設定されていません",
"Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can't configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: " : "Socialが適切に設定されるためには、well-knownの自動検出が必要です。 Nextcloudがドメインのルートにインストールされていない場合、Nextcloudがこれを自動的に設定できないことがよくあります。 Socialを使用するには、このNextcloudインスタンスの管理者は手動で.well-knownリダイレクトを設定する必要があります。",
".well-known/webfinger isn't properly set up!" : ".well-known/webfingerが正しく設定されていません",
"Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can't configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: " : "Socialが適切に設定されるためには、.well-knownの自動検出が必要です。 Nextcloudがドメインのルートにインストールされていない場合、Nextcloudがこれを自動的に設定できないことがよくあります。 Socialを使用するには、このNextcloudインスタンスの管理者は手動で.well-knownリダイレクトを設定する必要があります。",
"Open documentation" : "ドキュメントを開く",
"Social app setup" : "Socialアプリのセットアップ",
"ActivityPub requires a fixed URL to make entries unique. Note that this can not be changed later without resetting the Social app." : "ActivityPubでは、エントリを一意にするために固定のURLが必要です。 \nこれは、Socialアプリをリセットせずに後で変更することはできません。",
"ActivityPub requires a fixed URL to make entries unique. Note that this can not be changed later without resetting the Social app." : "ActivityPubでは、エントリを一意にするために固定のURLが必要です。 これは、Socialアプリをリセットせずに後で変更することはできません。",
"ActivityPub URL base" : "ActivityPub URLベース",
"Finish setup" : "セットアップを終了",
"The Social app needs to be set up by the server administrator." : "Socialアプリはサーバー管理者が設定する必要があります。",

Wyświetl plik

@ -1,11 +1,11 @@
{ "translations": {
"🎉 Nextcloud becomes part of the federated social networks!" : "🎉 Nextcloudは分散ソーシャルネットワークの一部になります",
"** Disclaimer: this is an ALPHA version **\n\n**🎉 Nextcloud becomes part of the federated social networks!**\n\n**🙋 Find your friends:** No matter if they use Nextcloud, 🐘 Mastodon, 🇫 Friendica, and soon ✱ Diaspora, 👹 MediaGoblin and more – you can follow them!\n\n**📜 Profile info:** No need to fill out more profiles – your info from Nextcloud will be used and extended.\n\n**👐 Own your posts:** Everything you post stays on your Nextcloud!\n\n**🕸 Open standards:** We use the established ActivityPub standard!" : "** 免責事項:これはアルファ版です **\n\n** 🎉 Nextcloudは分散型ソーシャルネットワークの一部になります**\n\n**🙋友達を探す:** Nextcloud、Mastodon、Friendica、近日中にはDiaspora、MediaGoblinなどを使用していてもフォローすることができます\n\n** プロフィール情報:**これ以上プロフィールを記入する必要はありません - Nextcloudからのあなたの情報は使用され、広がってゆきます。\n\n**👐自分の投稿:**投稿したものはすべてNextcloudに残ります\n\n**オープンスタンダード:**確立されたActivityPub形式を使用しています",
".well-known/webfinger isn't properly set up!" : ".well-known / webfingerが正しく設定されていません",
"Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can't configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: " : "Socialが適切に設定されるためには、well-knownの自動検出が必要です。 Nextcloudがドメインのルートにインストールされていない場合、Nextcloudがこれを自動的に設定できないことがよくあります。 Socialを使用するには、このNextcloudインスタンスの管理者は手動で.well-knownリダイレクトを設定する必要があります。",
".well-known/webfinger isn't properly set up!" : ".well-known/webfingerが正しく設定されていません",
"Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can't configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: " : "Socialが適切に設定されるためには、.well-knownの自動検出が必要です。 Nextcloudがドメインのルートにインストールされていない場合、Nextcloudがこれを自動的に設定できないことがよくあります。 Socialを使用するには、このNextcloudインスタンスの管理者は手動で.well-knownリダイレクトを設定する必要があります。",
"Open documentation" : "ドキュメントを開く",
"Social app setup" : "Socialアプリのセットアップ",
"ActivityPub requires a fixed URL to make entries unique. Note that this can not be changed later without resetting the Social app." : "ActivityPubでは、エントリを一意にするために固定のURLが必要です。 \nこれは、Socialアプリをリセットせずに後で変更することはできません。",
"ActivityPub requires a fixed URL to make entries unique. Note that this can not be changed later without resetting the Social app." : "ActivityPubでは、エントリを一意にするために固定のURLが必要です。 これは、Socialアプリをリセットせずに後で変更することはできません。",
"ActivityPub URL base" : "ActivityPub URLベース",
"Finish setup" : "セットアップを終了",
"The Social app needs to be set up by the server administrator." : "Socialアプリはサーバー管理者が設定する必要があります。",

Wyświetl plik

@ -257,12 +257,11 @@ class SignatureService {
}
try {
$origin = $this->checkRequestSignature($request, $data);
return $this->checkRequestSignature($request, $data);
} catch (RequestContentException $e) {
throw new SignatureIsGoneException();
} catch (SignatureException $e) {
}
return $origin;
}
@ -360,9 +359,9 @@ class SignatureService {
* @throws RequestResultNotJsonException
* @throws RequestResultSizeException
* @throws RequestServerException
* @throws SignatureException
* @throws SocialAppConfigException
* @throws UnauthorizedFediverseException
* @throws SignatureException
*/
private function checkRequestSignature(IRequest $request, string $data): string {
$signatureHeader = $request->getHeader('Signature');
@ -381,7 +380,29 @@ class SignatureService {
// TODO: check digest
// $this->generateDigest($data);
$publicKey = $this->retrieveKey($keyId);
try {
$publicKey = $this->retrieveKey($keyId);
$this->checkRequestSignatureUsingPublicKey($publicKey, $sign, $estimated, $signed);
} catch (SignatureException $e) {
$publicKey = $this->retrieveKey($keyId, true);
$this->checkRequestSignatureUsingPublicKey($publicKey, $sign, $estimated, $signed);
}
return $origin;
}
/**
* @param string $publicKey
* @param array $sign
* @param string $estimated
* @param bool $signed
*
* @throws SignatureException
*/
private function checkRequestSignatureUsingPublicKey(
string $publicKey, array $sign, string $estimated, bool $signed
) {
$algorithm = $this->getAlgorithmFromSignature($sign);
if ($publicKey === ''
|| openssl_verify($estimated, $signed, $publicKey, $algorithm) !== 1) {
@ -390,8 +411,6 @@ class SignatureService {
. ' - algo: ' . $algorithm . ' - estimated: ' . $estimated
);
}
return $origin;
}

3000
package-lock.json wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -31,8 +31,8 @@
"linkifyjs": "^2.1.8",
"nextcloud-axios": "^0.2.0",
"nextcloud-vue": "^0.11.4",
"tributejs": "^3.7.1",
"twemoji": "12.0.1",
"tributejs": "^3.7.2",
"twemoji": "^12.0.1",
"uuid": "^3.3.2",
"v-tooltip": "^3.0.0-alpha.11",
"vue": "^2.6.10",
@ -40,7 +40,7 @@
"vue-contenteditable-directive": "^1.2.0",
"vue-emoji-picker": "^1.0.1",
"vue-infinite-loading": "^2.4.4",
"vue-router": "^3.0.7",
"vue-router": "^3.1.2",
"vue-tribute": "^1.0.3",
"vue-twemoji": "^1.0.1",
"vuex": "^3.1.1",
@ -59,11 +59,11 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.5.5",
"@vue/test-utils": "^1.0.0-beta.29",
"acorn": "^6.2.1",
"acorn": "^6.3.0",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.6",
"css-loader": "^3.1.0",
"css-loader": "^3.2.0",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
@ -73,8 +73,8 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.3",
"file-loader": "^4.1.0",
"jest": "^24.8.0",
"file-loader": "^4.2.0",
"jest": "^24.9.0",
"jest-serializer-vue": "^2.0.2",
"node-sass": "^4.12.0",
"prettier-eslint": "^9.0.0",
@ -87,7 +87,7 @@
"vue-loader": "^15.7.1",
"vue-style-loader": "^4.1.1",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.39.1",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.6",
"webpack-merge": "^4.2.1"
},

Wyświetl plik

@ -323,11 +323,6 @@
vertical-align: middle;
margin-top: -1px;
}
img.emoji {
margin: 3px;
width: 16px;
vertical-align: text-bottom;
}
.hashtag {
text-decoration: underline;
}

Wyświetl plik

@ -7,20 +7,25 @@
:disable-tooltip="true" />
</div>
<div class="post-content">
<div class="post-author-wrapper">
<router-link v-if="item.actor_info" :to="{ name: 'profile', params: { account: item.local ? item.actor_info.preferredUsername : item.actor_info.account }}">
<span class="post-author">
{{ userDisplayName(item.actor_info) }}
</span>
<span class="post-author-id">
@{{ item.actor_info.account }}
</span>
</router-link>
<a v-else :href="item.attributedTo">
<span class="post-author-id">
{{ item.attributedTo }}
</span>
</a>
<div class="post-header">
<div class="post-author-wrapper">
<router-link v-if="item.actor_info" :to="{ name: 'profile', params: { account: item.local ? item.actor_info.preferredUsername : item.actor_info.account }}">
<span class="post-author">
{{ userDisplayName(item.actor_info) }}
</span>
<span class="post-author-id">
@{{ item.actor_info.account }}
</span>
</router-link>
<a v-else :href="item.attributedTo">
<span class="post-author-id">
{{ item.attributedTo }}
</span>
</a>
</div>
<div :data-timestamp="timestamp" class="post-timestamp live-relative-timestamp">
{{ relativeTimestamp }}
</div>
</div>
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="post-message" v-html="formatedMessage" />
@ -41,11 +46,6 @@
</div>
</div>
</div>
<div>
<div :data-timestamp="timestamp" class="post-timestamp live-relative-timestamp">
{{ relativeTimestamp }}
</div>
</div>
</div>
</template>
@ -246,6 +246,12 @@ export default {
flex-grow: 1;
}
.post-header {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.post-timestamp {
opacity: .7;
}