mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Merge branch 'master' into release
This commit is contained in:
commit
b8fcefc794
2
.github/translators.txt
vendored
2
.github/translators.txt
vendored
@ -184,3 +184,5 @@ Frost-ZX :: Chinese Simplified
|
||||
Kuzma Simonov (ovmach) :: Russian
|
||||
Vojtěch Krystek (acantophis) :: Czech
|
||||
Michał Lipok (mLipok) :: Polish
|
||||
Nicolas Pawlak (Mikolajek) :: French
|
||||
Thomas Hansen (thomasdk81) :: Danish
|
||||
|
@ -8,7 +8,6 @@ use Illuminate\Http\Request;
|
||||
|
||||
class ApplyCspRules
|
||||
{
|
||||
|
||||
/**
|
||||
* @var CspService
|
||||
*/
|
||||
@ -43,5 +42,4 @@ class ApplyCspRules
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
return new SocialAuthService($app->make(SocialiteFactory::class), $app->make(LoginService::class));
|
||||
});
|
||||
|
||||
$this->app->singleton(CspService::class, function($app) {
|
||||
$this->app->singleton(CspService::class, function ($app) {
|
||||
return new CspService();
|
||||
});
|
||||
}
|
||||
|
@ -33,9 +33,10 @@ class CustomHtmlHeadContentProvider
|
||||
{
|
||||
$content = $this->getSourceContent();
|
||||
$hash = md5($content);
|
||||
$html = $this->cache->remember('custom-head-web:' . $hash, 86400, function() use ($content) {
|
||||
$html = $this->cache->remember('custom-head-web:' . $hash, 86400, function () use ($content) {
|
||||
return HtmlNonceApplicator::prepare($content);
|
||||
});
|
||||
|
||||
return HtmlNonceApplicator::apply($html, $this->cspService->getNonce());
|
||||
}
|
||||
|
||||
@ -47,8 +48,9 @@ class CustomHtmlHeadContentProvider
|
||||
{
|
||||
$content = $this->getSourceContent();
|
||||
$hash = md5($content);
|
||||
return $this->cache->remember('custom-head-export:' . $hash, 86400, function() use ($content) {
|
||||
return HtmlContentFilter::removeScripts($content);
|
||||
|
||||
return $this->cache->remember('custom-head-export:' . $hash, 86400, function () use ($content) {
|
||||
return HtmlContentFilter::removeScripts($content);
|
||||
});
|
||||
}
|
||||
|
||||
@ -59,5 +61,4 @@ class CustomHtmlHeadContentProvider
|
||||
{
|
||||
return setting('app-custom-head', '');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ class CspService
|
||||
|
||||
public function __construct(string $nonce = '')
|
||||
{
|
||||
$this->nonce = $nonce ?: Str::random(16);
|
||||
$this->nonce = $nonce ?: Str::random(24);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -90,7 +90,7 @@ class CspService
|
||||
protected function getAllowedIframeHosts(): array
|
||||
{
|
||||
$hosts = config('app.iframe_hosts', '');
|
||||
|
||||
return array_filter(explode(' ', $hosts));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ class HtmlContentFilter
|
||||
{
|
||||
$value = strtolower($value);
|
||||
$upperVal = strtoupper($value);
|
||||
|
||||
return 'contains(translate(' . $property . ', \'' . $upperVal . '\', \'' . $value . '\'), \'' . $value . '\')';
|
||||
}
|
||||
|
||||
|
@ -21,10 +21,10 @@ class HtmlNonceApplicator
|
||||
return $html;
|
||||
}
|
||||
|
||||
$html = '<body>' . $html . '</body>';
|
||||
$html = '<?xml encoding="utf-8" ?><body>' . $html . '</body>';
|
||||
libxml_use_internal_errors(true);
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
|
||||
$doc->loadHTML($html, LIBXML_SCHEMA_CREATE);
|
||||
$xPath = new DOMXPath($doc);
|
||||
|
||||
// Apply to scripts
|
||||
@ -38,7 +38,8 @@ class HtmlNonceApplicator
|
||||
$returnHtml = '';
|
||||
$topElems = $doc->documentElement->childNodes->item(0)->childNodes;
|
||||
foreach ($topElems as $child) {
|
||||
$returnHtml .= $doc->saveHTML($child);
|
||||
$content = $doc->saveHTML($child);
|
||||
$returnHtml .= $content;
|
||||
}
|
||||
|
||||
return $returnHtml;
|
||||
@ -59,5 +60,4 @@ class HtmlNonceApplicator
|
||||
$node->setAttribute('nonce', $attrValue);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,12 +44,12 @@ return [
|
||||
'bookshelf_delete_notification' => 'Bogreolen blev opdateret',
|
||||
|
||||
// Favourites
|
||||
'favourite_add_notification' => '":name" has been added to your favourites',
|
||||
'favourite_remove_notification' => '":name" has been removed from your favourites',
|
||||
'favourite_add_notification' => '":name" er blevet tilføjet til dine favoritter',
|
||||
'favourite_remove_notification' => '":name" er blevet fjernet fra dine favoritter',
|
||||
|
||||
// MFA
|
||||
'mfa_setup_method_notification' => 'Multi-factor method successfully configured',
|
||||
'mfa_remove_method_notification' => 'Multi-factor method successfully removed',
|
||||
'mfa_setup_method_notification' => 'Multi-faktor metode konfigureret',
|
||||
'mfa_remove_method_notification' => 'Multi-faktor metode fjernet',
|
||||
|
||||
// Other
|
||||
'commented_on' => 'kommenterede til',
|
||||
|
@ -76,19 +76,19 @@ return [
|
||||
'user_invite_success' => 'Adgangskode indstillet, du har nu adgang til :appName!',
|
||||
|
||||
// Multi-factor Authentication
|
||||
'mfa_setup' => 'Setup Multi-Factor Authentication',
|
||||
'mfa_setup_desc' => 'Setup multi-factor authentication as an extra layer of security for your user account.',
|
||||
'mfa_setup_configured' => 'Already configured',
|
||||
'mfa_setup_reconfigure' => 'Reconfigure',
|
||||
'mfa_setup_remove_confirmation' => 'Are you sure you want to remove this multi-factor authentication method?',
|
||||
'mfa_setup_action' => 'Setup',
|
||||
'mfa_backup_codes_usage_limit_warning' => 'You have less than 5 backup codes remaining, Please generate and store a new set before you run out of codes to prevent being locked out of your account.',
|
||||
'mfa_option_totp_title' => 'Mobile App',
|
||||
'mfa_option_totp_desc' => 'To use multi-factor authentication you\'ll need a mobile application that supports TOTP such as Google Authenticator, Authy or Microsoft Authenticator.',
|
||||
'mfa_option_backup_codes_title' => 'Backup Codes',
|
||||
'mfa_option_backup_codes_desc' => 'Securely store a set of one-time-use backup codes which you can enter to verify your identity.',
|
||||
'mfa_gen_confirm_and_enable' => 'Confirm and Enable',
|
||||
'mfa_gen_backup_codes_title' => 'Backup Codes Setup',
|
||||
'mfa_setup' => 'Opsætning af Multi-faktor godkendelse',
|
||||
'mfa_setup_desc' => 'Opsæt multi-faktor godkendelse som et ekstra lag af sikkerhed for din brugerkonto.',
|
||||
'mfa_setup_configured' => 'Allerede konfigureret',
|
||||
'mfa_setup_reconfigure' => 'Genkonfigurer',
|
||||
'mfa_setup_remove_confirmation' => 'Er du sikker på, at du vil fjerne denne multi-faktor godkendelsesmetode?',
|
||||
'mfa_setup_action' => 'Opsætning',
|
||||
'mfa_backup_codes_usage_limit_warning' => 'Du har mindre end 5 backup koder tilbage, generere og gem et nyt sæt før du løber tør for koder, for at forhindre at blive lukket ude af din konto.',
|
||||
'mfa_option_totp_title' => 'Mobil app',
|
||||
'mfa_option_totp_desc' => 'For at bruge multi-faktor godkendelse, skal du bruge en mobil app, der understøtter TOTP såsom Google Authenticator, Authy eller Microsoft Authenticator.',
|
||||
'mfa_option_backup_codes_title' => 'Backup koder',
|
||||
'mfa_option_backup_codes_desc' => 'Gem sikkert et sæt af engangs backup koder, som du kan indtaste for at bekræfte din identitet.',
|
||||
'mfa_gen_confirm_and_enable' => 'Bekræft og aktivér',
|
||||
'mfa_gen_backup_codes_title' => 'Backup koder opsætning',
|
||||
'mfa_gen_backup_codes_desc' => 'Store the below list of codes in a safe place. When accessing the system you\'ll be able to use one of the codes as a second authentication mechanism.',
|
||||
'mfa_gen_backup_codes_download' => 'Download Codes',
|
||||
'mfa_gen_backup_codes_usage_warning' => 'Each code can only be used once',
|
||||
|
@ -39,12 +39,12 @@ return [
|
||||
'reset' => 'Nulstil',
|
||||
'remove' => 'Fjern',
|
||||
'add' => 'Tilføj',
|
||||
'configure' => 'Configure',
|
||||
'configure' => 'Konfigurer',
|
||||
'fullscreen' => 'Fuld skærm',
|
||||
'favourite' => 'Favourite',
|
||||
'unfavourite' => 'Unfavourite',
|
||||
'next' => 'Next',
|
||||
'previous' => 'Previous',
|
||||
'favourite' => 'Foretrukken',
|
||||
'unfavourite' => 'Fjern som foretrukken',
|
||||
'next' => 'Næste',
|
||||
'previous' => 'Forrige',
|
||||
|
||||
// Sort Options
|
||||
'sort_options' => 'Sorteringsindstillinger',
|
||||
@ -61,7 +61,7 @@ return [
|
||||
'no_activity' => 'Ingen aktivitet at vise',
|
||||
'no_items' => 'Intet indhold tilgængeligt',
|
||||
'back_to_top' => 'Tilbage til toppen',
|
||||
'skip_to_main_content' => 'Skip to main content',
|
||||
'skip_to_main_content' => 'Spring til indhold',
|
||||
'toggle_details' => 'Vis/skjul detaljer',
|
||||
'toggle_thumbnails' => 'Vis/skjul miniaturer',
|
||||
'details' => 'Detaljer',
|
||||
|
@ -27,8 +27,8 @@ return [
|
||||
'images' => 'Billeder',
|
||||
'my_recent_drafts' => 'Mine seneste kladder',
|
||||
'my_recently_viewed' => 'Mine senest viste',
|
||||
'my_most_viewed_favourites' => 'My Most Viewed Favourites',
|
||||
'my_favourites' => 'My Favourites',
|
||||
'my_most_viewed_favourites' => 'Mine mest viste favoritter',
|
||||
'my_favourites' => 'Mine favoritter',
|
||||
'no_pages_viewed' => 'Du har ikke besøgt nogle sider',
|
||||
'no_pages_recently_created' => 'Ingen sider er blevet oprettet for nyligt',
|
||||
'no_pages_recently_updated' => 'Ingen sider er blevet opdateret for nyligt',
|
||||
@ -36,7 +36,7 @@ return [
|
||||
'export_html' => 'Indeholdt webfil',
|
||||
'export_pdf' => 'PDF-fil',
|
||||
'export_text' => 'Almindelig tekstfil',
|
||||
'export_md' => 'Markdown File',
|
||||
'export_md' => 'Markdown Fil',
|
||||
|
||||
// Permissions and restrictions
|
||||
'permissions' => 'Rettigheder',
|
||||
@ -99,7 +99,7 @@ return [
|
||||
'shelves_permissions' => 'Reoltilladelser',
|
||||
'shelves_permissions_updated' => 'Reoltilladelser opdateret',
|
||||
'shelves_permissions_active' => 'Aktive reoltilladelser',
|
||||
'shelves_permissions_cascade_warning' => 'Permissions on bookshelves do not automatically cascade to contained books. This is because a book can exist on multiple shelves. Permissions can however be copied down to child books using the option found below.',
|
||||
'shelves_permissions_cascade_warning' => 'Tilladelser på reoler nedarves ikke automatisk til indeholdte bøger. Dette skyldes, at en bog kan eksistere på flere hylder. Tilladelser kan dog kopieres ned til underliggende bøger ved hjælp af muligheden, der findes nedenfor.',
|
||||
'shelves_copy_permissions_to_books' => 'Kopier tilladelser til bøger',
|
||||
'shelves_copy_permissions' => 'Kopier tilladelser',
|
||||
'shelves_copy_permissions_explain' => 'Dette vil anvende de aktuelle tilladelsesindstillinger på denne boghylde på alle bøger indeholdt i. Før aktivering skal du sikre dig, at ændringer i tilladelserne til denne boghylde er blevet gemt.',
|
||||
|
@ -83,9 +83,9 @@ return [
|
||||
'404_page_not_found' => 'Siden blev ikke fundet',
|
||||
'sorry_page_not_found' => 'Beklager, siden du leder efter blev ikke fundet.',
|
||||
'sorry_page_not_found_permission_warning' => 'Hvis du forventede, at denne side skulle eksistere, har du muligvis ikke tilladelse til at se den.',
|
||||
'image_not_found' => 'Image Not Found',
|
||||
'image_not_found_subtitle' => 'Sorry, The image file you were looking for could not be found.',
|
||||
'image_not_found_details' => 'If you expected this image to exist it might have been deleted.',
|
||||
'image_not_found' => 'Billede ikke fundet',
|
||||
'image_not_found_subtitle' => 'Beklager, billedet du ledte efter kunne ikke findes.',
|
||||
'image_not_found_details' => 'Hvis du forventede, at dette billede skulle eksistere, kan det være blevet slettet.',
|
||||
'return_home' => 'Gå tilbage til hjem',
|
||||
'error_occurred' => 'Der opstod en fejl',
|
||||
'app_down' => ':appName er nede lige nu',
|
||||
|
@ -92,7 +92,7 @@ return [
|
||||
'recycle_bin' => 'Papirkurv',
|
||||
'recycle_bin_desc' => 'Her kan du gendanne elementer, der er blevet slettet eller vælge at permanent fjerne dem fra systemet. Denne liste er ufiltreret, i modsætning til lignende aktivitetslister i systemet, hvor tilladelsesfiltre anvendes.',
|
||||
'recycle_bin_deleted_item' => 'Slettet element',
|
||||
'recycle_bin_deleted_parent' => 'Parent',
|
||||
'recycle_bin_deleted_parent' => 'Overordnet',
|
||||
'recycle_bin_deleted_by' => 'Slettet af',
|
||||
'recycle_bin_deleted_at' => 'Sletningstidspunkt',
|
||||
'recycle_bin_permanently_delete' => 'Slet permanent',
|
||||
@ -105,7 +105,7 @@ return [
|
||||
'recycle_bin_restore_list' => 'Elementer der skal gendannes',
|
||||
'recycle_bin_restore_confirm' => 'Denne handling vil gendanne det slettede element, herunder alle underelementer, til deres oprindelige placering. Hvis den oprindelige placering siden er blevet slettet, og nu er i papirkurven, vil det overordnede element også skulle gendannes.',
|
||||
'recycle_bin_restore_deleted_parent' => 'Det overordnede element til dette element er også blevet slettet. Disse vil forblive slettet indtil det overordnede også er gendannet.',
|
||||
'recycle_bin_restore_parent' => 'Restore Parent',
|
||||
'recycle_bin_restore_parent' => 'Gendan Overordnet',
|
||||
'recycle_bin_destroy_notification' => 'Slettede :count elementer fra papirkurven.',
|
||||
'recycle_bin_restore_notification' => 'Gendannede :count elementer fra papirkurven.',
|
||||
|
||||
@ -138,7 +138,7 @@ return [
|
||||
'role_details' => 'Rolledetaljer',
|
||||
'role_name' => 'Rollenavn',
|
||||
'role_desc' => 'Kort beskrivelse af rolle',
|
||||
'role_mfa_enforced' => 'Requires Multi-Factor Authentication',
|
||||
'role_mfa_enforced' => 'Kræver multifaktor godkendelse',
|
||||
'role_external_auth_id' => 'Eksterne godkendelses-IDer',
|
||||
'role_system' => 'Systemtilladelser',
|
||||
'role_manage_users' => 'Administrere brugere',
|
||||
@ -148,7 +148,7 @@ return [
|
||||
'role_manage_page_templates' => 'Administrer side-skabeloner',
|
||||
'role_access_api' => 'Tilgå system-API',
|
||||
'role_manage_settings' => 'Administrer app-indstillinger',
|
||||
'role_export_content' => 'Export content',
|
||||
'role_export_content' => 'Eksporter indhold',
|
||||
'role_asset' => 'Tilladelser for medier og "assets"',
|
||||
'roles_system_warning' => 'Vær opmærksom på, at adgang til alle af de ovennævnte tre tilladelser, kan give en bruger mulighed for at ændre deres egne brugerrettigheder eller brugerrettigheder for andre i systemet. Tildel kun roller med disse tilladelser til betroede brugere.',
|
||||
'role_asset_desc' => 'Disse tilladelser kontrollerer standardadgang til medier og "assets" i systemet. Tilladelser til bøger, kapitler og sider tilsidesætter disse tilladelser.',
|
||||
@ -206,10 +206,10 @@ return [
|
||||
'users_api_tokens_create' => 'Opret Token',
|
||||
'users_api_tokens_expires' => 'Udløber',
|
||||
'users_api_tokens_docs' => 'API-dokumentation',
|
||||
'users_mfa' => 'Multi-Factor Authentication',
|
||||
'users_mfa_desc' => 'Setup multi-factor authentication as an extra layer of security for your user account.',
|
||||
'users_mfa_x_methods' => ':count method configured|:count methods configured',
|
||||
'users_mfa_configure' => 'Configure Methods',
|
||||
'users_mfa' => 'Multi-faktor godkendelse',
|
||||
'users_mfa_desc' => 'Opsæt multi-faktor godkendelse som et ekstra lag af sikkerhed for din brugerkonto.',
|
||||
'users_mfa_x_methods' => ':count metode konfigureret|:count metoder konfigureret',
|
||||
'users_mfa_configure' => 'Konfigurer metoder',
|
||||
|
||||
// API Tokens
|
||||
'user_api_token_create' => 'Opret API-token',
|
||||
|
@ -15,7 +15,7 @@ return [
|
||||
'alpha_dash' => ':attribute må kun bestå af bogstaver, tal, binde- og under-streger.',
|
||||
'alpha_num' => ':attribute må kun indeholde bogstaver og tal.',
|
||||
'array' => ':attribute skal være et array.',
|
||||
'backup_codes' => 'The provided code is not valid or has already been used.',
|
||||
'backup_codes' => 'Den angivne kode er ikke gyldig eller er allerede brugt.',
|
||||
'before' => ':attribute skal være en dato før :date.',
|
||||
'between' => [
|
||||
'numeric' => ':attribute skal være mellem :min og :max.',
|
||||
@ -99,7 +99,7 @@ return [
|
||||
],
|
||||
'string' => ':attribute skal være tekst.',
|
||||
'timezone' => ':attribute skal være en gyldig zone.',
|
||||
'totp' => 'The provided code is not valid or has expired.',
|
||||
'totp' => 'Den angivne kode er ikke gyldig eller er udløbet.',
|
||||
'unique' => ':attribute er allerede i brug.',
|
||||
'url' => ':attribute-formatet er ugyldigt.',
|
||||
'uploaded' => 'Filen kunne ikke oploades. Serveren accepterer muligvis ikke filer af denne størrelse.',
|
||||
|
@ -80,11 +80,11 @@ return [
|
||||
'mfa_setup_desc' => 'La autenticación en dos pasos añade una capa de seguridad adicional a tu cuenta de usuario.',
|
||||
'mfa_setup_configured' => 'Ya está configurado',
|
||||
'mfa_setup_reconfigure' => 'Reconfigurar',
|
||||
'mfa_setup_remove_confirmation' => '¿Está seguro de que desea eliminar este método de autenticación de dos pasos?',
|
||||
'mfa_setup_remove_confirmation' => '¿Está seguro de que desea eliminar este método de autenticación en dos pasos?',
|
||||
'mfa_setup_action' => 'Configuración',
|
||||
'mfa_backup_codes_usage_limit_warning' => 'Quedan menos de 5 códigos de respaldo, Por favor, genera y almacena un nuevo conjunto antes de que te quedes sin códigos para evitar que te bloquees fuera de tu cuenta.',
|
||||
'mfa_option_totp_title' => 'Aplicación para móviles',
|
||||
'mfa_option_totp_desc' => 'Para utilizar la autenticación de dos pasos necesitarás una aplicación móvil que soporte TOTP como Google Authenticator, Authy o Microsoft Authenticator.',
|
||||
'mfa_option_totp_desc' => 'Para utilizar la autenticación en dos pasos necesitarás una aplicación móvil que soporte TOTP como Google Authenticator, Authy o Microsoft Authenticator.',
|
||||
'mfa_option_backup_codes_title' => 'Códigos de Respaldo',
|
||||
'mfa_option_backup_codes_desc' => 'Almacena de forma segura un conjunto de códigos de respaldo de un solo uso que puedes introducir para verificar tu identidad.',
|
||||
'mfa_gen_confirm_and_enable' => 'Confirmar y Activar',
|
||||
@ -93,7 +93,7 @@ return [
|
||||
'mfa_gen_backup_codes_download' => 'Descargar Códigos',
|
||||
'mfa_gen_backup_codes_usage_warning' => 'Cada código sólo puede utilizarse una vez',
|
||||
'mfa_gen_totp_title' => 'Configuración de Aplicación móvil',
|
||||
'mfa_gen_totp_desc' => 'Para utilizar la autenticación de dos pasos necesitarás una aplicación móvil que soporte TOTP como Google Authenticator, Authy o Microsoft Authenticator.',
|
||||
'mfa_gen_totp_desc' => 'Para utilizar la autenticación en dos pasos necesitarás una aplicación móvil que soporte TOTP como Google Authenticator, Authy o Microsoft Authenticator.',
|
||||
'mfa_gen_totp_scan' => 'Escanea el código QR mostrado a continuación usando tu aplicación de autenticación preferida para empezar.',
|
||||
'mfa_gen_totp_verify_setup' => 'Verificar Configuración',
|
||||
'mfa_gen_totp_verify_setup_desc' => 'Verifica que todo está funcionando introduciendo un código, generado en tu aplicación de autenticación, en el campo de texto a continuación:',
|
||||
@ -101,7 +101,7 @@ return [
|
||||
'mfa_verify_access' => 'Verificar Acceso',
|
||||
'mfa_verify_access_desc' => 'Tu cuenta de usuario requiere que confirmes tu identidad a través de un nivel adicional de verificación antes de que te conceda el acceso. Verifica tu identidad usando uno de los métodos configurados para continuar.',
|
||||
'mfa_verify_no_methods' => 'No hay Métodos Configurados',
|
||||
'mfa_verify_no_methods_desc' => 'No se han encontrado métodos de autenticación de dos pasos para tu cuenta. Tendrás que configurar al menos un método antes de obtener acceso.',
|
||||
'mfa_verify_no_methods_desc' => 'No se han encontrado métodos de autenticación en dos pasos para tu cuenta. Tendrás que configurar al menos un método antes de obtener acceso.',
|
||||
'mfa_verify_use_totp' => 'Verificar usando una aplicación móvil',
|
||||
'mfa_verify_use_backup_codes' => 'Verificar usando un código de respaldo',
|
||||
'mfa_verify_backup_code' => 'Códigos de Respaldo',
|
||||
|
@ -82,31 +82,31 @@ return [
|
||||
'mfa_setup_reconfigure' => 'Reconfigurer',
|
||||
'mfa_setup_remove_confirmation' => 'Êtes-vous sûr de vouloir supprimer cette méthode d\'authentification multi-facteurs ?',
|
||||
'mfa_setup_action' => 'Configuration',
|
||||
'mfa_backup_codes_usage_limit_warning' => 'You have less than 5 backup codes remaining, Please generate and store a new set before you run out of codes to prevent being locked out of your account.',
|
||||
'mfa_backup_codes_usage_limit_warning' => 'Il vous reste moins de 5 codes de secours, veuillez générer et stocker un nouveau jeu de codes afin d\'éviter tout verrouillage de votre compte.',
|
||||
'mfa_option_totp_title' => 'Application mobile',
|
||||
'mfa_option_totp_desc' => 'Pour utiliser l\'authentification multi-facteurs, vous aurez besoin d\'une application mobile qui supporte TOTP comme Google Authenticator, Authy ou Microsoft Authenticator.',
|
||||
'mfa_option_backup_codes_title' => 'Backup Codes',
|
||||
'mfa_option_backup_codes_desc' => 'Securely store a set of one-time-use backup codes which you can enter to verify your identity.',
|
||||
'mfa_option_backup_codes_title' => 'Codes de secours',
|
||||
'mfa_option_backup_codes_desc' => 'Stockez en toute sécurité un jeu de codes de secours que vous pourrez utiliser pour vérifier votre identité.',
|
||||
'mfa_gen_confirm_and_enable' => 'Confirmer et activer',
|
||||
'mfa_gen_backup_codes_title' => 'Backup Codes Setup',
|
||||
'mfa_gen_backup_codes_title' => 'Configuration des codes de secours',
|
||||
'mfa_gen_backup_codes_desc' => 'Stockez la liste des codes ci-dessous dans un endroit sûr. Lorsque vous accédez au système, vous pourrez utiliser l\'un des codes comme un deuxième mécanisme d\'authentification.',
|
||||
'mfa_gen_backup_codes_download' => 'Télécharger le code',
|
||||
'mfa_gen_backup_codes_usage_warning' => 'Chaque code ne peut être utilisé qu\'une seule fois',
|
||||
'mfa_gen_totp_title' => 'Configuration de l\'application mobile',
|
||||
'mfa_gen_totp_desc' => 'To use multi-factor authentication you\'ll need a mobile application that supports TOTP such as Google Authenticator, Authy or Microsoft Authenticator.',
|
||||
'mfa_gen_totp_scan' => 'Scan the QR code below using your preferred authentication app to get started.',
|
||||
'mfa_gen_totp_desc' => 'Pour utiliser l\'authentification multi-facteurs, vous aurez besoin d\'une application mobile qui supporte TOTP comme Google Authenticator, Authy ou Microsoft Authenticator.',
|
||||
'mfa_gen_totp_scan' => 'Scannez le QR code ci-dessous avec votre application d\'authentification préférée pour débuter.',
|
||||
'mfa_gen_totp_verify_setup' => 'Vérifier la configuration',
|
||||
'mfa_gen_totp_verify_setup_desc' => 'Verify that all is working by entering a code, generated within your authentication app, in the input box below:',
|
||||
'mfa_gen_totp_verify_setup_desc' => 'Vérifiez que tout fonctionne en utilisant un code généré par votre application d\'authentification, dans la zone ci-dessous :',
|
||||
'mfa_gen_totp_provide_code_here' => 'Fournir le code généré par votre application ici',
|
||||
'mfa_verify_access' => 'Vérifier l\'accès',
|
||||
'mfa_verify_access_desc' => 'Your user account requires you to confirm your identity via an additional level of verification before you\'re granted access. Verify using one of your configured methods to continue.',
|
||||
'mfa_verify_access_desc' => 'Votre compte d\'utilisateur vous demande de confirmer votre identité par un niveau supplémentaire de vérification avant que vous n\'ayez accès. Vérifiez-la en utilisant l\'une de vos méthodes configurées pour continuer.',
|
||||
'mfa_verify_no_methods' => 'Aucune méthode configurée',
|
||||
'mfa_verify_no_methods_desc' => 'Aucune méthode d\'authentification multi-facteurs n\'a pu être trouvée pour votre compte. Vous devez configurer au moins une méthode avant d\'obtenir l\'accès.',
|
||||
'mfa_verify_use_totp' => 'Vérifier à l\'aide d\'une application mobile',
|
||||
'mfa_verify_use_backup_codes' => 'Verify using a backup code',
|
||||
'mfa_verify_backup_code' => 'Backup Code',
|
||||
'mfa_verify_backup_code_desc' => 'Enter one of your remaining backup codes below:',
|
||||
'mfa_verify_backup_code_enter_here' => 'Enter backup code here',
|
||||
'mfa_verify_use_backup_codes' => 'Vérifier en utilisant un code de secours',
|
||||
'mfa_verify_backup_code' => 'Code de secours',
|
||||
'mfa_verify_backup_code_desc' => 'Entrez l\'un de vos codes de secours restants ci-dessous :',
|
||||
'mfa_verify_backup_code_enter_here' => 'Saisissez un code de secours ici',
|
||||
'mfa_verify_totp_desc' => 'Entrez ci-dessous le code généré à l\'aide de votre application mobile :',
|
||||
'mfa_setup_login_notification' => 'Méthode multi-facteurs configurée. Veuillez maintenant vous reconnecter en utilisant la méthode configurée.',
|
||||
];
|
@ -99,7 +99,7 @@ return [
|
||||
'shelves_permissions' => 'Permissions de l\'étagère',
|
||||
'shelves_permissions_updated' => 'Permissions de l\'étagère mises à jour',
|
||||
'shelves_permissions_active' => 'Permissions de l\'étagère activées',
|
||||
'shelves_permissions_cascade_warning' => 'Permissions on bookshelves do not automatically cascade to contained books. This is because a book can exist on multiple shelves. Permissions can however be copied down to child books using the option found below.',
|
||||
'shelves_permissions_cascade_warning' => 'Les permissions sur les étagères ne sont pas automatiquement recopiées aux livres qu\'elles contiennent, car un livre peut exister dans plusieurs étagères. Les permissions peuvent cependant être recopiées vers les livres contenus en utilisant l\'option ci-dessous.',
|
||||
'shelves_copy_permissions_to_books' => 'Copier les permissions vers les livres',
|
||||
'shelves_copy_permissions' => 'Copier les permissions',
|
||||
'shelves_copy_permissions_explain' => 'Ceci va appliquer les permissions actuelles de cette étagère à tous les livres qu\'elle contient. Avant de continuer, assurez-vous que toutes les permissions de cette étagère ont été sauvegardées.',
|
||||
|
@ -38,7 +38,7 @@ return [
|
||||
'app_homepage_desc' => 'Choisissez une page à afficher sur la page d\'accueil au lieu de la vue par défaut. Les permissions sont ignorées pour les pages sélectionnées.',
|
||||
'app_homepage_select' => 'Choisissez une page',
|
||||
'app_footer_links' => 'Liens de pied de page',
|
||||
'app_footer_links_desc' => 'Ajoutez des liens dans le pied de page du site. Ils seront affichés en bas de la plupart des pages, incluant celles qui ne nécesittent pas de connexion. Vous pouvez utiliser l\'étiquette "trans::<key>" pour utiliser les traductions définies par le système. Par exemple, utiliser "trans::common.privacy_policy" fournira la traduction de "Politique de Confidentalité" et "trans::common.terms_of_service" fournira la traduction de "Conditions d\'utilisation".',
|
||||
'app_footer_links_desc' => 'Ajouter des liens à afficher dans le pied de page du site. Ils seront affichés en bas de la plupart des pages, y compris ceux qui ne nécessitent pas de connexion. Vous pouvez utiliser une étiquette de "trans::<key>" pour utiliser les traductions définies par le système. Par exemple : utiliser "trans::common.privacy_policy" fournira le texte traduit "Privacy Policy" et "trans::common.terms_of_service" fournira le texte traduit "Terms of Service".',
|
||||
'app_footer_links_label' => 'Libellé du lien',
|
||||
'app_footer_links_url' => 'URL du lien',
|
||||
'app_footer_links_add' => 'Ajouter un lien en pied de page',
|
||||
@ -148,7 +148,7 @@ return [
|
||||
'role_manage_page_templates' => 'Gérer les modèles de page',
|
||||
'role_access_api' => 'Accès à l\'API du système',
|
||||
'role_manage_settings' => 'Gérer les préférences de l\'application',
|
||||
'role_export_content' => 'Export content',
|
||||
'role_export_content' => 'Exporter le contenu',
|
||||
'role_asset' => 'Permissions des ressources',
|
||||
'roles_system_warning' => 'Sachez que l\'accès à l\'une des trois permissions ci-dessus peut permettre à un utilisateur de modifier ses propres privilèges ou les privilèges des autres utilisateurs du système. Attribuer uniquement des rôles avec ces permissions à des utilisateurs de confiance.',
|
||||
'role_asset_desc' => 'Ces permissions contrôlent l\'accès par défaut des ressources dans le système. Les permissions dans les livres, les chapitres et les pages ignoreront ces permissions',
|
||||
@ -178,7 +178,7 @@ return [
|
||||
'users_send_invite_option' => 'Envoyer l\'e-mail d\'invitation',
|
||||
'users_external_auth_id' => 'Identifiant d\'authentification externe',
|
||||
'users_external_auth_id_desc' => 'C\'est l\'ID utilisé pour correspondre à cet utilisateur lors de la communication avec votre système d\'authentification externe.',
|
||||
'users_password_warning' => 'Remplissez ce formulaire uniquement si vous souhaitez changer de mot de passe:',
|
||||
'users_password_warning' => 'Remplissez ce formulaire uniquement si vous souhaitez changer de mot de passe :',
|
||||
'users_system_public' => 'Cet utilisateur représente les invités visitant votre instance. Il est assigné automatiquement aux invités.',
|
||||
'users_delete' => 'Supprimer un utilisateur',
|
||||
'users_delete_named' => 'Supprimer l\'utilisateur :userName',
|
||||
@ -208,7 +208,7 @@ return [
|
||||
'users_api_tokens_docs' => 'Documentation de l\'API',
|
||||
'users_mfa' => 'Authentification multi-facteurs',
|
||||
'users_mfa_desc' => 'Configurez l\'authentification multi-facteurs ajoute une couche supplémentaire de sécurité à votre compte utilisateur.',
|
||||
'users_mfa_x_methods' => ':count method configured|:count methods configured',
|
||||
'users_mfa_x_methods' => ':count méthode configurée|:count méthodes configurées',
|
||||
'users_mfa_configure' => 'Méthode de configuration',
|
||||
|
||||
// API Tokens
|
||||
|
@ -48,8 +48,8 @@ return [
|
||||
'favourite_remove_notification' => '":name" è stato rimosso dai tuoi preferiti',
|
||||
|
||||
// MFA
|
||||
'mfa_setup_method_notification' => 'Multi-factor method successfully configured',
|
||||
'mfa_remove_method_notification' => 'Multi-factor method successfully removed',
|
||||
'mfa_setup_method_notification' => 'Metodo multi-fattore impostato con successo',
|
||||
'mfa_remove_method_notification' => 'Metodo multi-fattore rimosso con successo',
|
||||
|
||||
// Other
|
||||
'commented_on' => 'ha commentato in',
|
||||
|
@ -99,7 +99,7 @@ return [
|
||||
'shelves_permissions' => 'Permessi Libreria',
|
||||
'shelves_permissions_updated' => 'Permessi Libreria Aggiornati',
|
||||
'shelves_permissions_active' => 'Permessi Attivi Libreria',
|
||||
'shelves_permissions_cascade_warning' => 'Permissions on bookshelves do not automatically cascade to contained books. This is because a book can exist on multiple shelves. Permissions can however be copied down to child books using the option found below.',
|
||||
'shelves_permissions_cascade_warning' => 'I permessi sugli scaffali non si estendono automaticamente ai libri contenuti. Questo avviene in quanto un libro può essere presente su più scaffali. I permessi possono comunque essere copiati ai libri contenuti usando l\'opzione qui sotto.',
|
||||
'shelves_copy_permissions_to_books' => 'Copia Permessi ai Libri',
|
||||
'shelves_copy_permissions' => 'Copia Permessi',
|
||||
'shelves_copy_permissions_explain' => 'Verranno applicati tutti i permessi della libreria ai libri contenuti. Prima di attivarlo, assicurati che ogni permesso di questa libreria sia salvato.',
|
||||
|
@ -138,7 +138,7 @@ return [
|
||||
'role_details' => 'Dettagli Ruolo',
|
||||
'role_name' => 'Nome Ruolo',
|
||||
'role_desc' => 'Breve Descrizione del Ruolo',
|
||||
'role_mfa_enforced' => 'Requires Multi-Factor Authentication',
|
||||
'role_mfa_enforced' => 'Richiesta autenticazione multi-fattore',
|
||||
'role_external_auth_id' => 'ID Autenticazione Esterna',
|
||||
'role_system' => 'Permessi di Sistema',
|
||||
'role_manage_users' => 'Gestire gli utenti',
|
||||
@ -148,7 +148,7 @@ return [
|
||||
'role_manage_page_templates' => 'Gestisci template pagine',
|
||||
'role_access_api' => 'API sistema d\'accesso',
|
||||
'role_manage_settings' => 'Gestire impostazioni app',
|
||||
'role_export_content' => 'Export content',
|
||||
'role_export_content' => 'Esporta contenuto',
|
||||
'role_asset' => 'Permessi Entità',
|
||||
'roles_system_warning' => 'Siate consapevoli che l\'accesso a uno dei tre permessi qui sopra, può consentire a un utente di modificare i propri privilegi o i privilegi di altri nel sistema. Assegna ruoli con questi permessi solo ad utenti fidati.',
|
||||
'role_asset_desc' => 'Questi permessi controllano l\'accesso di default alle entità. I permessi nei Libri, Capitoli e Pagine sovrascriveranno questi.',
|
||||
@ -206,10 +206,10 @@ return [
|
||||
'users_api_tokens_create' => 'Crea Token',
|
||||
'users_api_tokens_expires' => 'Scade',
|
||||
'users_api_tokens_docs' => 'Documentazione API',
|
||||
'users_mfa' => 'Multi-Factor Authentication',
|
||||
'users_mfa_desc' => 'Setup multi-factor authentication as an extra layer of security for your user account.',
|
||||
'users_mfa_x_methods' => ':count method configured|:count methods configured',
|
||||
'users_mfa_configure' => 'Configure Methods',
|
||||
'users_mfa' => 'Autenticazione multi-fattore',
|
||||
'users_mfa_desc' => 'Imposta l\'autenticazione multi-fattore come misura di sicurezza aggiuntiva per il tuo account.',
|
||||
'users_mfa_x_methods' => ':count metodo configurato|:count metodi configurati',
|
||||
'users_mfa_configure' => 'Configura metodi',
|
||||
|
||||
// API Tokens
|
||||
'user_api_token_create' => 'Crea Token API',
|
||||
|
@ -15,7 +15,7 @@ return [
|
||||
'alpha_dash' => ':attribute deve contenere solo lettere, numeri e meno.',
|
||||
'alpha_num' => ':attribute deve contenere solo lettere e numeri.',
|
||||
'array' => ':attribute deve essere un array.',
|
||||
'backup_codes' => 'The provided code is not valid or has already been used.',
|
||||
'backup_codes' => 'Il codice fornito non è valido o è già stato utilizzato.',
|
||||
'before' => ':attribute deve essere una data prima del :date.',
|
||||
'between' => [
|
||||
'numeric' => 'Il campo :attribute deve essere tra :min e :max.',
|
||||
@ -99,7 +99,7 @@ return [
|
||||
],
|
||||
'string' => ':attribute deve essere una stringa.',
|
||||
'timezone' => ':attribute deve essere una zona valida.',
|
||||
'totp' => 'The provided code is not valid or has expired.',
|
||||
'totp' => 'Il codice fornito non è valido o è scaduto.',
|
||||
'unique' => ':attribute è già preso.',
|
||||
'url' => 'Il formato :attribute non è valido.',
|
||||
'uploaded' => 'Il file non può essere caricato. Il server potrebbe non accettare file di questa dimensione.',
|
||||
|
@ -48,8 +48,8 @@ return [
|
||||
'favourite_remove_notification' => '":name" удалено из избранного',
|
||||
|
||||
// MFA
|
||||
'mfa_setup_method_notification' => 'Multi-factor method successfully configured',
|
||||
'mfa_remove_method_notification' => 'Multi-factor method successfully removed',
|
||||
'mfa_setup_method_notification' => 'Двухфакторный метод авторизации успешно настроен',
|
||||
'mfa_remove_method_notification' => 'Двухфакторный метод авторизации успешно удален',
|
||||
|
||||
// Other
|
||||
'commented_on' => 'прокомментировал',
|
||||
|
@ -309,7 +309,7 @@ class PageContentTest extends TestCase
|
||||
{
|
||||
$checks = [
|
||||
'<svg id="test" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100"><a xlink:href="javascript:alert(document.domain)"><rect x="0" y="0" width="100" height="100" /></a></svg>',
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><use xlink:href="data:application/xml;base64 ,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KPGRlZnM+CjxjaXJjbGUgaWQ9InRlc3QiIHI9IjAiIGN4PSIwIiBjeT0iMCIgc3R5bGU9ImZpbGw6ICNGMDAiPgo8c2V0IGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGF0dHJpYnV0ZVR5cGU9IkNTUyIgb25iZWdpbj0nYWxlcnQoZG9jdW1lbnQuZG9tYWluKScKb25lbmQ9J2FsZXJ0KCJvbmVuZCIpJyB0bz0iIzAwRiIgYmVnaW49IjBzIiBkdXI9Ijk5OXMiIC8+CjwvY2lyY2xlPgo8L2RlZnM+Cjx1c2UgeGxpbms6aHJlZj0iI3Rlc3QiLz4KPC9zdmc+#test"/></svg>'
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><use xlink:href="data:application/xml;base64 ,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KPGRlZnM+CjxjaXJjbGUgaWQ9InRlc3QiIHI9IjAiIGN4PSIwIiBjeT0iMCIgc3R5bGU9ImZpbGw6ICNGMDAiPgo8c2V0IGF0dHJpYnV0ZU5hbWU9ImZpbGwiIGF0dHJpYnV0ZVR5cGU9IkNTUyIgb25iZWdpbj0nYWxlcnQoZG9jdW1lbnQuZG9tYWluKScKb25lbmQ9J2FsZXJ0KCJvbmVuZCIpJyB0bz0iIzAwRiIgYmVnaW49IjBzIiBkdXI9Ijk5OXMiIC8+CjwvY2lyY2xlPgo8L2RlZnM+Cjx1c2UgeGxpbms6aHJlZj0iI3Rlc3QiLz4KPC9zdmc+#test"/></svg>',
|
||||
];
|
||||
|
||||
$this->asEditor();
|
||||
|
@ -125,6 +125,7 @@ class SecurityHeaderTest extends TestCase
|
||||
protected function getCspHeader(TestResponse $resp, string $type): string
|
||||
{
|
||||
$cspHeaders = collect($resp->headers->all('Content-Security-Policy'));
|
||||
|
||||
return $cspHeaders->filter(function ($val) use ($type) {
|
||||
return strpos($val, $type) === 0;
|
||||
})->first() ?? '';
|
||||
|
66
tests/Settings/CustomHeadContentTest.php
Normal file
66
tests/Settings/CustomHeadContentTest.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Settings;
|
||||
|
||||
use BookStack\Util\CspService;
|
||||
use Tests\TestCase;
|
||||
|
||||
class CustomHeadContentTest extends TestCase
|
||||
{
|
||||
public function test_configured_content_shows_on_pages()
|
||||
{
|
||||
$this->setSettings(['app-custom-head' => '<script>console.log("cat");</script>']);
|
||||
$resp = $this->get('/login');
|
||||
$resp->assertSee('console.log("cat")');
|
||||
}
|
||||
|
||||
public function test_configured_content_does_not_show_on_settings_page()
|
||||
{
|
||||
$this->setSettings(['app-custom-head' => '<script>console.log("cat");</script>']);
|
||||
$resp = $this->asAdmin()->get('/settings');
|
||||
$resp->assertDontSee('console.log("cat")');
|
||||
}
|
||||
|
||||
public function test_divs_in_js_preserved_in_configured_content()
|
||||
{
|
||||
$this->setSettings(['app-custom-head' => '<script><div id="hello">cat</div></script>']);
|
||||
$resp = $this->get('/login');
|
||||
$resp->assertSee('<div id="hello">cat</div>');
|
||||
}
|
||||
|
||||
public function test_nonce_application_handles_edge_cases()
|
||||
{
|
||||
$mockCSP = $this->mock(CspService::class);
|
||||
$mockCSP->shouldReceive('getNonce')->andReturn('abc123');
|
||||
|
||||
$content = trim('
|
||||
<script>console.log("cat");</script>
|
||||
<script type="text/html"><\script>const a = `<div></div>`<\/\script></script>
|
||||
<script >const a = `<div></div>`;</script>
|
||||
<script type="<script text>test">const c = `<div></div>`;</script>
|
||||
<script
|
||||
type="text/html"
|
||||
>
|
||||
const a = `<\script><\/script>`;
|
||||
const b = `<script`;
|
||||
</script>
|
||||
<SCRIPT>const b = `↗️£`;</SCRIPT>
|
||||
');
|
||||
|
||||
$expectedOutput = trim('
|
||||
<script nonce="abc123">console.log("cat");</script>
|
||||
<script type="text/html" nonce="abc123"><\script>const a = `<div></div>`<\/\script></script>
|
||||
<script nonce="abc123">const a = `<div></div>`;</script>
|
||||
<script type="<script text>test" nonce="abc123">const c = `<div></div>`;</script>
|
||||
<script type="text/html" nonce="abc123">
|
||||
const a = `<\script><\/script>`;
|
||||
const b = `<script`;
|
||||
</script>
|
||||
<script nonce="abc123">const b = `↗️£`;</script>
|
||||
');
|
||||
|
||||
$this->setSettings(['app-custom-head' => $content]);
|
||||
$resp = $this->get('/login');
|
||||
$resp->assertSee($expectedOutput);
|
||||
}
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Settings;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class FooterLinksTest extends TestCase
|
Loading…
Reference in New Issue
Block a user