From 034478409e3101d9fad8a4073112ffcb3f7852fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mare=C5=A1?= Date: Fri, 3 Apr 2020 14:05:07 +0200 Subject: [PATCH 01/22] Add support Windows Authentication via SAML --- .env.example.complete | 8 +++++++- app/Config/saml2.php | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.env.example.complete b/.env.example.complete index 86a7351c2..d3f109f2f 100644 --- a/.env.example.complete +++ b/.env.example.complete @@ -222,6 +222,12 @@ SAML2_ONELOGIN_OVERRIDES=null SAML2_DUMP_USER_DETAILS=false SAML2_AUTOLOAD_METADATA=false +# SAML Authentication context. +# Set to false and no AuthContext will be sent in the AuthNRequest, +# Set true and you will get an AuthContext 'exact' 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport' +# Set an array with the possible auth context values: array ('urn:oasis:names:tc:SAML:2.0:ac:classes:Password', 'urn:oasis:names:tc:SAML:2.0:ac:classes:X509'), +SAML2_IDP_AUTHNCONTEXT=false + # SAML group sync configuration # Refer to https://www.bookstackapp.com/docs/admin/saml2-auth/ SAML2_USER_TO_GROUPS=false @@ -267,4 +273,4 @@ API_DEFAULT_ITEM_COUNT=100 API_MAX_ITEM_COUNT=500 # The number of API requests that can be made per minute by a single user. -API_REQUESTS_PER_MIN=180 \ No newline at end of file +API_REQUESTS_PER_MIN=180 diff --git a/app/Config/saml2.php b/app/Config/saml2.php index 5f2c1395b..83fa4f227 100644 --- a/app/Config/saml2.php +++ b/app/Config/saml2.php @@ -139,6 +139,12 @@ return [ // ) // ), ], + 'security' => [ + // Specifies Authentication context + // false means that IDP choose authentication method + // null force Form based authentication or is possible set via array supported methods. See to onelogin/php-sampl/advance_settings + 'requestedAuthnContext' => env('SAML2_IDP_AUTHNCONTEXT',false), + ], ], ]; From ab584c93bc52443e6aeb52a791760fc6083edbf4 Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 00:11:01 +0900 Subject: [PATCH 02/22] Korean translations activities.php common.php entities.php validation.php --- resources/lang/ko/activities.php | 2 +- resources/lang/ko/common.php | 8 ++++---- resources/lang/ko/entities.php | 2 +- resources/lang/ko/validation.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/lang/ko/activities.php b/resources/lang/ko/activities.php index fda7e4ef3..2762c7eb4 100644 --- a/resources/lang/ko/activities.php +++ b/resources/lang/ko/activities.php @@ -45,5 +45,5 @@ return [ // Other 'commented_on' => '댓글 쓰기', - 'permissions_update' => 'updated permissions', + 'permissions_update' => '업데이트된 권한', ]; diff --git a/resources/lang/ko/common.php b/resources/lang/ko/common.php index bb304bea1..3c40f12e2 100644 --- a/resources/lang/ko/common.php +++ b/resources/lang/ko/common.php @@ -74,9 +74,9 @@ return [ // Layout tabs 'tab_info' => '정보', - 'tab_info_label' => 'Tab: Show Secondary Information', + 'tab_info_label' => '탭: 보조 정보 표시', 'tab_content' => '내용', - 'tab_content_label' => 'Tab: Show Primary Content', + 'tab_content_label' => '탭: 주요 내용 표시', // Email Content 'email_action_help' => ':actionText를 클릭할 수 없을 때는 웹 브라우저에서 다음 링크로 접속할 수 있습니다.', @@ -84,6 +84,6 @@ return [ // Footer Link Options // Not directly used but available for convenience to users. - 'privacy_policy' => 'Privacy Policy', - 'terms_of_service' => 'Terms of Service', + 'privacy_policy' => '개인정보처리방침', + 'terms_of_service' => '이용약관', ]; diff --git a/resources/lang/ko/entities.php b/resources/lang/ko/entities.php index e2fa0c7ae..4d6e4c657 100644 --- a/resources/lang/ko/entities.php +++ b/resources/lang/ko/entities.php @@ -149,7 +149,7 @@ return [ 'chapters_create' => '챕터 만들기', 'chapters_delete' => '챕터 삭제하기', 'chapters_delete_named' => ':chapterName(을)를 지웁니다.', - 'chapters_delete_explain' => 'This will delete the chapter with the name \':chapterName\'. All pages that exist within this chapter will also be deleted.', + 'chapters_delete_explain' => '\':chapterName\'(을)를 지웁니다. 해당 챕터에 있는 모든 문서도 삭제됩니다.', 'chapters_delete_confirm' => '이 챕터를 지울 건가요?', 'chapters_edit' => '챕터 바꾸기', 'chapters_edit_named' => ':chapterName 바꾸기', diff --git a/resources/lang/ko/validation.php b/resources/lang/ko/validation.php index 6754d9620..78b17a1d2 100644 --- a/resources/lang/ko/validation.php +++ b/resources/lang/ko/validation.php @@ -89,7 +89,7 @@ return [ 'required_without' => ':values(이)가 없을 때 :attribute(을)를 구성해야 합니다.', 'required_without_all' => ':values(이)가 모두 없을 때 :attribute(을)를 구성해야 합니다.', 'same' => ':attribute(와)과 :other(을)를 똑같이 구성하세요.', - 'safe_url' => 'The provided link may not be safe.', + 'safe_url' => '제공된 링크가 안전하지 않을 수 있습니다.', 'size' => [ 'numeric' => ':attribute(을)를 :size(으)로 구성하세요.', 'file' => ':attribute(을)를 :size킬로바이트로 구성하세요.', From 2093122ac52a1595aad95c42a7e28f3fdbe6b392 Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 12:58:53 +0900 Subject: [PATCH 03/22] Korean translation resources/lang/ko/settings.php --- resources/lang/ko/settings.php | 66 +++++++++++++++++----------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/resources/lang/ko/settings.php b/resources/lang/ko/settings.php index 920ce0450..1192e7ffa 100755 --- a/resources/lang/ko/settings.php +++ b/resources/lang/ko/settings.php @@ -37,11 +37,11 @@ return [ 'app_homepage' => '처음 페이지', 'app_homepage_desc' => '고른 페이지에 설정한 권한은 무시합니다.', 'app_homepage_select' => '문서 고르기', - 'app_footer_links' => 'Footer Links', - 'app_footer_links_desc' => 'Add links to show within the site footer. These will be displayed at the bottom of most pages, including those that do not require login. You can use a label of "trans::" to use system-defined translations. For example: Using "trans::common.privacy_policy" will provide the translated text "Privacy Policy" and "trans::common.terms_of_service" will provide the translated text "Terms of Service".', - 'app_footer_links_label' => 'Link Label', - 'app_footer_links_url' => 'Link URL', - 'app_footer_links_add' => 'Add Footer Link', + 'app_footer_links' => '푸터 링크', + 'app_footer_links_desc' => '사이트 푸터에 표시할 링크를 추가합니다. 로그인이 필요하지 않은 페이지들을 포함하여 대부분의 페이지 하단에 표시됩니다. 시스템 정의 번역을 사용하기 위해 "trans::"를 사용할 수 있습니다. 예를 들어: "trans::common.privacy_policy"를 사용하면 번역된 "개인정보처리방침"이 제공되며, "trans::common.terms_of_service"는 번역된 "이용약관"를 제공합니다.', + 'app_footer_links_label' => '링크 라벨', + 'app_footer_links_url' => '링크 URL', + 'app_footer_links_add' => '푸터 링크 추가', 'app_disable_comments' => '댓글 사용 안 함', 'app_disable_comments_toggle' => '댓글 사용 안 함', 'app_disable_comments_desc' => '모든 페이지에서 댓글을 숨깁니다.', @@ -73,7 +73,7 @@ return [ 'maint' => '데이터', 'maint_image_cleanup' => '이미지 정리', 'maint_image_cleanup_desc' => "중복한 이미지를 찾습니다. 실행하기 전에 이미지를 백업하세요.", - 'maint_delete_images_only_in_revisions' => 'Also delete images that only exist in old page revisions', + 'maint_delete_images_only_in_revisions' => '또한 이전 페이지 수정본에만 있는 이미지 삭제하기', 'maint_image_cleanup_run' => '실행', 'maint_image_cleanup_warning' => '이미지 :count개를 지울 건가요?', 'maint_image_cleanup_success' => '이미지 :count개 삭제함', @@ -85,38 +85,38 @@ return [ 'maint_send_test_email_mail_subject' => '테스트 메일', 'maint_send_test_email_mail_greeting' => '이메일 전송이 성공하였습니다.', 'maint_send_test_email_mail_text' => '축하합니다! 이 메일을 받음으로 이메일 설정이 정상적으로 되었음을 확인하였습니다.', - 'maint_recycle_bin_desc' => 'Deleted shelves, books, chapters & pages are sent to the recycle bin so they can be restored or permanently deleted. Older items in the recycle bin may be automatically removed after a while depending on system configuration.', - 'maint_recycle_bin_open' => 'Open Recycle Bin', + 'maint_recycle_bin_desc' => '삭제된 서가, 책자, 챕터 & 문서들을 휴지통으로 보내져 복구하거나 또는 영구적으로 삭제할 수 있습니다. 휴지통의 오래된 항목은 시스템 구성에 따라 잠시 후 자동으로 삭제될 수 있습니다.', + 'maint_recycle_bin_open' => '휴지통 열기', // Recycle Bin - 'recycle_bin' => 'Recycle Bin', - 'recycle_bin_desc' => 'Here you can restore items that have been deleted or choose to permanently remove them from the system. This list is unfiltered unlike similar activity lists in the system where permission filters are applied.', - 'recycle_bin_deleted_item' => 'Deleted Item', - 'recycle_bin_deleted_by' => 'Deleted By', - 'recycle_bin_deleted_at' => 'Deletion Time', - 'recycle_bin_permanently_delete' => 'Permanently Delete', - 'recycle_bin_restore' => 'Restore', - 'recycle_bin_contents_empty' => 'The recycle bin is currently empty', - 'recycle_bin_empty' => 'Empty Recycle Bin', - 'recycle_bin_empty_confirm' => 'This will permanently destroy all items in the recycle bin including content contained within each item. Are you sure you want to empty the recycle bin?', - 'recycle_bin_destroy_confirm' => 'This action will permanently delete this item, along with any child elements listed below, from the system and you will not be able to restore this content. Are you sure you want to permanently delete this item?', - 'recycle_bin_destroy_list' => 'Items to be Destroyed', - 'recycle_bin_restore_list' => 'Items to be Restored', - 'recycle_bin_restore_confirm' => 'This action will restore the deleted item, including any child elements, to their original location. If the original location has since been deleted, and is now in the recycle bin, the parent item will also need to be restored.', - 'recycle_bin_restore_deleted_parent' => 'The parent of this item has also been deleted. These will remain deleted until that parent is also restored.', - 'recycle_bin_destroy_notification' => 'Deleted :count total items from the recycle bin.', - 'recycle_bin_restore_notification' => 'Restored :count total items from the recycle bin.', + 'recycle_bin' => '휴지통', + 'recycle_bin_desc' => '여기서 삭제된 항목을 복원하거나 시스템에서 영구적으로 제거하도록 선택할 수 있습니다. 이 목록은 권한 필터가 적용되는 시스템의 유사한 활동 목록과 달리 필터링되지 않습니다.', + 'recycle_bin_deleted_item' => '삭제된 항목', + 'recycle_bin_deleted_by' => '삭제자', + 'recycle_bin_deleted_at' => '삭제 시간', + 'recycle_bin_permanently_delete' => '영구적으로 삭제하기', + 'recycle_bin_restore' => '복원하기', + 'recycle_bin_contents_empty' => '휴지통은 현재 비어있습니다.', + 'recycle_bin_empty' => '휴지통 비우기', + 'recycle_bin_empty_confirm' => '각 항목에 포함된 내용을 포함하여 휴지통의 모든 항목이 영구히 삭제됩니다. 휴지통을 비우시겠습니까?', + 'recycle_bin_destroy_confirm' => '이 작업을 수행하면 아래 나열된 하위 요소와 함께 이 항목이 시스템에서 영구적으로 삭제되고 이 내용을 복원할 수 없습니다. 이 항목을 완전히 삭제하시겠습니까?', + 'recycle_bin_destroy_list' => '삭제할 항목들', + 'recycle_bin_restore_list' => '복원할 항목들', + 'recycle_bin_restore_confirm' => '이 작업을 수행하면 하위 요소를 포함하여 삭제된 항목이 원래 위치로 복원됩니다. 원래 위치가 삭제되고 현재 휴지통에 있는 경우 상위 항목도 복원해야 합니다.', + 'recycle_bin_restore_deleted_parent' => '이 항목의 상위 항목도 삭제되었습니다. 상위 항목도 복원될 때까지 삭제된 상태로 유지됩니다.', + 'recycle_bin_destroy_notification' => '휴지통에서 총 :total 개의 항목들이 삭제되었습니다.', + 'recycle_bin_restore_notification' => '휴지통에서 총 :count 개의 항목들이 복원되었습니다.', // Audit Log 'audit' => '감사 기록', - 'audit_desc' => 'This audit log displays a list of activities tracked in the system. This list is unfiltered unlike similar activity lists in the system where permission filters are applied.', + 'audit_desc' => '이 감사 로그는 시스템에서 추적한 활동 목록을 표시합니다. 이 목록은 권한 필터가 적용되는 시스템의 유사한 활동 목록과 달리 필터링되지 않습니다.', 'audit_event_filter' => '이벤트 필터', 'audit_event_filter_no_filter' => '필터 없음', 'audit_deleted_item' => '삭제된 항목', 'audit_deleted_item_name' => '이름: :name', 'audit_table_user' => '사용자', 'audit_table_event' => '이벤트', - 'audit_table_related' => 'Related Item or Detail', + 'audit_table_related' => '관련 항목 또는 세부 정보', 'audit_table_date' => '활동 날짜', 'audit_date_from' => '날짜 범위 시작', 'audit_date_to' => '날짜 범위 끝', @@ -146,7 +146,7 @@ return [ 'role_access_api' => '시스템 접근 API', 'role_manage_settings' => '사이트 설정 관리', 'role_asset' => '권한 항목', - 'roles_system_warning' => 'Be aware that access to any of the above three permissions can allow a user to alter their own privileges or the privileges of others in the system. Only assign roles with these permissions to trusted users.', + 'roles_system_warning' => '위의 세 가지 권한 중 하나에 액세스하면 사용자가 자신의 권한이나 시스템 내 다른 사용자의 권한을 변경할 수 있습니다. 이러한 권한이 있는 역할만 신뢰할 수 있는 사용자에게 할당합니다.', 'role_asset_desc' => '책자, 챕터, 문서별 권한은 이 설정에 우선합니다.', 'role_asset_admins' => 'Admin 권한은 어디든 접근할 수 있지만 이 설정은 사용자 인터페이스에서 해당 활동을 표시할지 결정합니다.', 'role_all' => '모든 항목', @@ -162,7 +162,7 @@ return [ 'user_profile' => '사용자 프로필', 'users_add_new' => '사용자 만들기', 'users_search' => '사용자 검색', - 'users_latest_activity' => 'Latest Activity', + 'users_latest_activity' => '최근 활동', 'users_details' => '사용자 정보', 'users_details_desc' => '메일 주소로 로그인합니다.', 'users_details_desc_no_email' => '사용자 이름을 바꿉니다.', @@ -180,10 +180,10 @@ return [ 'users_delete_named' => ':userName 삭제', 'users_delete_warning' => ':userName에 관한 데이터를 지웁니다.', 'users_delete_confirm' => '이 사용자를 지울 건가요?', - 'users_migrate_ownership' => 'Migrate Ownership', - 'users_migrate_ownership_desc' => 'Select a user here if you want another user to become the owner of all items currently owned by this user.', - 'users_none_selected' => 'No user selected', - 'users_delete_success' => 'User successfully removed', + 'users_migrate_ownership' => '소유권 이전', + 'users_migrate_ownership_desc' => '다른 사용자가 현재 이 사용자가 소유하고 있는 모든 항목의 소유자가 되려면 여기서 사용자를 선택하십시오.', + 'users_none_selected' => '선택된 사용자가 없습니다.', + 'users_delete_success' => '사용자가 성공적으로 삭제되었습니다.', 'users_edit' => '사용자 수정', 'users_edit_profile' => '프로필 바꾸기', 'users_edit_success' => '프로필 바꿈', From 65fe89441fd19047845fc283f690c59b28308cb4 Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 13:39:11 +0900 Subject: [PATCH 04/22] fix pages_revisions_resotred_from --- resources/lang/ko/entities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/ko/entities.php b/resources/lang/ko/entities.php index 4d6e4c657..94a62c67a 100644 --- a/resources/lang/ko/entities.php +++ b/resources/lang/ko/entities.php @@ -211,7 +211,7 @@ return [ 'pages_revisions' => '문서 수정본', 'pages_revisions_named' => ':pageName 수정본', 'pages_revision_named' => ':pageName 수정본', - 'pages_revision_restored_from' => 'Restored from #:id; :summary', + 'pages_revision_restored_from' => '#:id 에서; :summary 복원', 'pages_revisions_created_by' => '만든 사용자', 'pages_revisions_date' => '수정한 날짜', 'pages_revisions_number' => 'No.', From 723dbe1da79c9ea3937fefe1c84a7df576cf1b10 Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 13:43:10 +0900 Subject: [PATCH 05/22] [Fix] korean --- resources/lang/ko/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/ko/settings.php b/resources/lang/ko/settings.php index 1192e7ffa..c23522505 100755 --- a/resources/lang/ko/settings.php +++ b/resources/lang/ko/settings.php @@ -38,7 +38,7 @@ return [ 'app_homepage_desc' => '고른 페이지에 설정한 권한은 무시합니다.', 'app_homepage_select' => '문서 고르기', 'app_footer_links' => '푸터 링크', - 'app_footer_links_desc' => '사이트 푸터에 표시할 링크를 추가합니다. 로그인이 필요하지 않은 페이지들을 포함하여 대부분의 페이지 하단에 표시됩니다. 시스템 정의 번역을 사용하기 위해 "trans::"를 사용할 수 있습니다. 예를 들어: "trans::common.privacy_policy"를 사용하면 번역된 "개인정보처리방침"이 제공되며, "trans::common.terms_of_service"는 번역된 "이용약관"를 제공합니다.', + 'app_footer_links_desc' => '사이트 푸터에 표시할 링크를 추가합니다. 로그인이 필요하지 않은 페이지들을 포함하여 대부분의 페이지 하단에 표시됩니다. 시스템 정의 번역을 사용하기 위해 "trans::"를 사용할 수 있습니다. 예를 들어: "trans::common.privacy_policy"를 사용하면 번역된 "개인정보처리방침"이 제공되며, "trans::common.terms_of_service"는 번역된 "이용약관"를 제공합니다.', 'app_footer_links_label' => '링크 라벨', 'app_footer_links_url' => '링크 URL', 'app_footer_links_add' => '푸터 링크 추가', @@ -104,7 +104,7 @@ return [ 'recycle_bin_restore_list' => '복원할 항목들', 'recycle_bin_restore_confirm' => '이 작업을 수행하면 하위 요소를 포함하여 삭제된 항목이 원래 위치로 복원됩니다. 원래 위치가 삭제되고 현재 휴지통에 있는 경우 상위 항목도 복원해야 합니다.', 'recycle_bin_restore_deleted_parent' => '이 항목의 상위 항목도 삭제되었습니다. 상위 항목도 복원될 때까지 삭제된 상태로 유지됩니다.', - 'recycle_bin_destroy_notification' => '휴지통에서 총 :total 개의 항목들이 삭제되었습니다.', + 'recycle_bin_destroy_notification' => '휴지통에서 총 :count 개의 항목들이 삭제되었습니다.', 'recycle_bin_restore_notification' => '휴지통에서 총 :count 개의 항목들이 복원되었습니다.', // Audit Log From 02e86ea18f3a8f0033f14553f428590df4d5d05e Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 13:44:50 +0900 Subject: [PATCH 06/22] [Fix] app_footer_links_desc --- resources/lang/ko/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/ko/settings.php b/resources/lang/ko/settings.php index c23522505..bc89992a2 100755 --- a/resources/lang/ko/settings.php +++ b/resources/lang/ko/settings.php @@ -38,7 +38,7 @@ return [ 'app_homepage_desc' => '고른 페이지에 설정한 권한은 무시합니다.', 'app_homepage_select' => '문서 고르기', 'app_footer_links' => '푸터 링크', - 'app_footer_links_desc' => '사이트 푸터에 표시할 링크를 추가합니다. 로그인이 필요하지 않은 페이지들을 포함하여 대부분의 페이지 하단에 표시됩니다. 시스템 정의 번역을 사용하기 위해 "trans::"를 사용할 수 있습니다. 예를 들어: "trans::common.privacy_policy"를 사용하면 번역된 "개인정보처리방침"이 제공되며, "trans::common.terms_of_service"는 번역된 "이용약관"를 제공합니다.', + 'app_footer_links_desc' => '사이트 푸터에 표시할 링크를 추가합니다. 로그인이 필요하지 않은 페이지들을 포함하여 대부분의 페이지 하단에 표시됩니다. 시스템 정의 번역을 사용하기 위해 "trans::"를 사용할 수 있습니다. 예를 들어: "trans::common.privacy_policy"를 사용하면 번역된 "개인정보처리방침"이 제공되며, "trans::common.terms_of_service"는 번역된 "이용약관"를 제공합니다.', 'app_footer_links_label' => '링크 라벨', 'app_footer_links_url' => '링크 URL', 'app_footer_links_add' => '푸터 링크 추가', From 66ecee1e265246c57109fdc3d26cb39f175a0032 Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 13:54:24 +0900 Subject: [PATCH 07/22] [Fix] maint_delete_images_only_in_revisions --- resources/lang/ko/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/ko/settings.php b/resources/lang/ko/settings.php index bc89992a2..728f29da4 100755 --- a/resources/lang/ko/settings.php +++ b/resources/lang/ko/settings.php @@ -73,7 +73,7 @@ return [ 'maint' => '데이터', 'maint_image_cleanup' => '이미지 정리', 'maint_image_cleanup_desc' => "중복한 이미지를 찾습니다. 실행하기 전에 이미지를 백업하세요.", - 'maint_delete_images_only_in_revisions' => '또한 이전 페이지 수정본에만 있는 이미지 삭제하기', + 'maint_delete_images_only_in_revisions' => '구 문서 수정본에만 있는 이미지도 삭제하기', 'maint_image_cleanup_run' => '실행', 'maint_image_cleanup_warning' => '이미지 :count개를 지울 건가요?', 'maint_image_cleanup_success' => '이미지 :count개 삭제함', From 79f5b579d74db1d54df406615e569668be96d9ab Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 14:49:46 +0900 Subject: [PATCH 08/22] [Fix] maint_delete_images_only_in_revisions better --- resources/lang/ko/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/ko/settings.php b/resources/lang/ko/settings.php index 728f29da4..8d628cf4a 100755 --- a/resources/lang/ko/settings.php +++ b/resources/lang/ko/settings.php @@ -73,7 +73,7 @@ return [ 'maint' => '데이터', 'maint_image_cleanup' => '이미지 정리', 'maint_image_cleanup_desc' => "중복한 이미지를 찾습니다. 실행하기 전에 이미지를 백업하세요.", - 'maint_delete_images_only_in_revisions' => '구 문서 수정본에만 있는 이미지도 삭제하기', + 'maint_delete_images_only_in_revisions' => '오래된 문서 수정본에만 있는 이미지도 삭제하기', 'maint_image_cleanup_run' => '실행', 'maint_image_cleanup_warning' => '이미지 :count개를 지울 건가요?', 'maint_image_cleanup_success' => '이미지 :count개 삭제함', From a2be61f26d259f555569d11858a71637842b361d Mon Sep 17 00:00:00 2001 From: Jokuna Date: Thu, 29 Apr 2021 15:06:58 +0900 Subject: [PATCH 09/22] [Fix] app_footer_links_desc --- resources/lang/ko/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/ko/settings.php b/resources/lang/ko/settings.php index 8d628cf4a..923d9e126 100755 --- a/resources/lang/ko/settings.php +++ b/resources/lang/ko/settings.php @@ -38,7 +38,7 @@ return [ 'app_homepage_desc' => '고른 페이지에 설정한 권한은 무시합니다.', 'app_homepage_select' => '문서 고르기', 'app_footer_links' => '푸터 링크', - 'app_footer_links_desc' => '사이트 푸터에 표시할 링크를 추가합니다. 로그인이 필요하지 않은 페이지들을 포함하여 대부분의 페이지 하단에 표시됩니다. 시스템 정의 번역을 사용하기 위해 "trans::"를 사용할 수 있습니다. 예를 들어: "trans::common.privacy_policy"를 사용하면 번역된 "개인정보처리방침"이 제공되며, "trans::common.terms_of_service"는 번역된 "이용약관"를 제공합니다.', + 'app_footer_links_desc' => '사이트 푸터에 표시할 링크들을 추가합니다. 로그인이 필요하지 않은 페이지들을 포함하여 대부분의 페이지 하단에 표시됩니다. 시스템 정의 번역을 사용하기 위해 "trans::"를 사용할 수 있습니다. 예를 들어: "trans::common.privacy_policy"를 사용하면 번역된 "개인정보처리방침"이 제공되며, "trans::common.terms_of_service"는 번역된 "이용약관"를 제공합니다.', 'app_footer_links_label' => '링크 라벨', 'app_footer_links_url' => '링크 URL', 'app_footer_links_add' => '푸터 링크 추가', From a3d36237e22338282053e3c9350eb1d1a72028c5 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 3 May 2021 22:28:25 +0100 Subject: [PATCH 10/22] Fixed white borders on layout tabs on ios Closes #2728 --- resources/sass/_header.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/sass/_header.scss b/resources/sass/_header.scss index 12f098a1b..1a7015078 100644 --- a/resources/sass/_header.scss +++ b/resources/sass/_header.scss @@ -228,6 +228,7 @@ header .search-box { text-align: center; border-bottom: 3px solid #BBB; cursor: pointer; + margin: 0; @include lightDark(background-color, #FFF, #222); @include lightDark(border-bottom-color, #BBB, #333); &:first-child { From c50ac022a820114f78d6d0c524d668503c78c50d Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 3 May 2021 22:32:19 +0100 Subject: [PATCH 11/22] Updated composer deps --- composer.lock | 347 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 208 insertions(+), 139 deletions(-) diff --git a/composer.lock b/composer.lock index 52e0aab74..7710274c1 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "aws/aws-sdk-php", - "version": "3.178.6", + "version": "3.180.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "0aa83b522d5ffa794c02e7411af87a0e241a3082" + "reference": "761d06d3d320bd1a0114f9d937eccd1613e1913b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0aa83b522d5ffa794c02e7411af87a0e241a3082", - "reference": "0aa83b522d5ffa794c02e7411af87a0e241a3082", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/761d06d3d320bd1a0114f9d937eccd1613e1913b", + "reference": "761d06d3d320bd1a0114f9d937eccd1613e1913b", "shasum": "" }, "require": { @@ -92,9 +92,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.178.6" + "source": "https://github.com/aws/aws-sdk-php/tree/3.180.0" }, - "time": "2021-04-19T18:13:17+00:00" + "time": "2021-05-03T20:41:22+00:00" }, { "name": "barryvdh/laravel-dompdf", @@ -229,40 +229,39 @@ }, { "name": "doctrine/cache", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "13e3381b25847283a91948d04640543941309727" + "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727", - "reference": "13e3381b25847283a91948d04640543941309727", + "url": "https://api.github.com/repos/doctrine/cache/zipball/a9c1b59eba5a08ca2770a76eddb88922f504e8e0", + "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0", "shasum": "" }, "require": { "php": "~7.1 || ^8.0" }, "conflict": { - "doctrine/common": ">2.2,<2.4" + "doctrine/common": ">2.2,<2.4", + "psr/cache": ">=3" }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^6.0", + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^8.0", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "predis/predis": "~1.0", + "psr/cache": "^1.0 || ^2.0", + "symfony/cache": "^4.4 || ^5.2" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" @@ -309,7 +308,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.10.x" + "source": "https://github.com/doctrine/cache/tree/1.11.0" }, "funding": [ { @@ -325,7 +324,7 @@ "type": "tidelift" } ], - "time": "2020-07-07T18:54:01+00:00" + "time": "2021-04-13T14:46:17+00:00" }, { "name": "doctrine/dbal", @@ -952,16 +951,16 @@ }, { "name": "facade/flare-client-php", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "6bf380035890cb0a09b9628c491ae3866b858522" + "reference": "69742118c037f34ee1ef86dc605be4a105d9e984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/6bf380035890cb0a09b9628c491ae3866b858522", - "reference": "6bf380035890cb0a09b9628c491ae3866b858522", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/69742118c037f34ee1ef86dc605be4a105d9e984", + "reference": "69742118c037f34ee1ef86dc605be4a105d9e984", "shasum": "" }, "require": { @@ -1005,7 +1004,7 @@ ], "support": { "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.7.0" + "source": "https://github.com/facade/flare-client-php/tree/1.8.0" }, "funding": [ { @@ -1013,7 +1012,7 @@ "type": "github" } ], - "time": "2021-04-12T09:30:36+00:00" + "time": "2021-04-30T11:11:50+00:00" }, { "name": "facade/ignition", @@ -1204,16 +1203,16 @@ }, { "name": "filp/whoops", - "version": "2.12.0", + "version": "2.12.1", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "d501fd2658d55491a2295ff600ae5978eaad7403" + "reference": "c13c0be93cff50f88bbd70827d993026821914dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/d501fd2658d55491a2295ff600ae5978eaad7403", - "reference": "d501fd2658d55491a2295ff600ae5978eaad7403", + "url": "https://api.github.com/repos/filp/whoops/zipball/c13c0be93cff50f88bbd70827d993026821914dd", + "reference": "c13c0be93cff50f88bbd70827d993026821914dd", "shasum": "" }, "require": { @@ -1263,7 +1262,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.12.0" + "source": "https://github.com/filp/whoops/tree/2.12.1" }, "funding": [ { @@ -1271,7 +1270,7 @@ "type": "github" } ], - "time": "2021-03-30T12:00:00+00:00" + "time": "2021-04-25T12:00:00+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1433,16 +1432,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.8.1", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" + "reference": "dc960a912984efb74d0a90222870c72c87f10c91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", - "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91", "shasum": "" }, "require": { @@ -1502,9 +1501,9 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.1" + "source": "https://github.com/guzzle/psr7/tree/1.8.2" }, - "time": "2021-03-21T16:25:00+00:00" + "time": "2021-04-26T09:17:50+00:00" }, { "name": "intervention/image", @@ -1652,16 +1651,16 @@ }, { "name": "laravel/framework", - "version": "v6.20.23", + "version": "v6.20.26", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "d94c07d72c14f07e7d2027458e7f0a76f9ceb0d9" + "reference": "0117d797dc1ab64b1f88d4f6b966380ea7def091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/d94c07d72c14f07e7d2027458e7f0a76f9ceb0d9", - "reference": "d94c07d72c14f07e7d2027458e7f0a76f9ceb0d9", + "url": "https://api.github.com/repos/laravel/framework/zipball/0117d797dc1ab64b1f88d4f6b966380ea7def091", + "reference": "0117d797dc1ab64b1f88d4f6b966380ea7def091", "shasum": "" }, "require": { @@ -1801,7 +1800,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-04-13T13:49:28+00:00" + "time": "2021-04-28T14:38:32+00:00" }, { "name": "laravel/socialite", @@ -1874,16 +1873,16 @@ }, { "name": "league/commonmark", - "version": "1.5.8", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf" + "reference": "19a9673b833cc37770439097b381d86cd125bfe8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf", - "reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/19a9673b833cc37770439097b381d86cd125bfe8", + "reference": "19a9673b833cc37770439097b381d86cd125bfe8", "shasum": "" }, "require": { @@ -1971,7 +1970,7 @@ "type": "tidelift" } ], - "time": "2021-03-28T18:51:39+00:00" + "time": "2021-05-01T19:00:49+00:00" }, { "name": "league/flysystem", @@ -2409,16 +2408,16 @@ }, { "name": "nesbot/carbon", - "version": "2.46.0", + "version": "2.47.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4" + "reference": "606262fd8888b75317ba9461825a24fc34001e1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4", - "reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/606262fd8888b75317ba9461825a24fc34001e1e", + "reference": "606262fd8888b75317ba9461825a24fc34001e1e", "shasum": "" }, "require": { @@ -2498,7 +2497,7 @@ "type": "tidelift" } ], - "time": "2021-02-24T17:30:44+00:00" + "time": "2021-04-13T21:54:02+00:00" }, { "name": "nunomaduro/collision", @@ -3228,16 +3227,16 @@ }, { "name": "psr/log", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -3261,7 +3260,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -3272,9 +3271,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2020-03-23T09:12:05+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -4073,16 +4072,16 @@ }, { "name": "symfony/console", - "version": "v4.4.21", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1ba4560dbbb9fcf5ae28b61f71f49c678086cf23" + "reference": "36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1ba4560dbbb9fcf5ae28b61f71f49c678086cf23", - "reference": "1ba4560dbbb9fcf5ae28b61f71f49c678086cf23", + "url": "https://api.github.com/repos/symfony/console/zipball/36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625", + "reference": "36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625", "shasum": "" }, "require": { @@ -4142,7 +4141,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.21" + "source": "https://github.com/symfony/console/tree/v4.4.22" }, "funding": [ { @@ -4158,20 +4157,20 @@ "type": "tidelift" } ], - "time": "2021-03-26T09:23:24+00:00" + "time": "2021-04-16T17:32:19+00:00" }, { "name": "symfony/css-selector", - "version": "v4.4.20", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "f907d3e53ecb2a5fad8609eb2f30525287a734c8" + "reference": "01c77324d1d47efbfd7891f62a7c256c69330115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/f907d3e53ecb2a5fad8609eb2f30525287a734c8", - "reference": "f907d3e53ecb2a5fad8609eb2f30525287a734c8", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/01c77324d1d47efbfd7891f62a7c256c69330115", + "reference": "01c77324d1d47efbfd7891f62a7c256c69330115", "shasum": "" }, "require": { @@ -4207,7 +4206,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v4.4.20" + "source": "https://github.com/symfony/css-selector/tree/v4.4.22" }, "funding": [ { @@ -4223,20 +4222,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-04-07T15:47:03+00:00" }, { "name": "symfony/debug", - "version": "v4.4.20", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "157bbec4fd773bae53c5483c50951a5530a2cc16" + "reference": "45b2136377cca5f10af858968d6079a482bca473" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/157bbec4fd773bae53c5483c50951a5530a2cc16", - "reference": "157bbec4fd773bae53c5483c50951a5530a2cc16", + "url": "https://api.github.com/repos/symfony/debug/zipball/45b2136377cca5f10af858968d6079a482bca473", + "reference": "45b2136377cca5f10af858968d6079a482bca473", "shasum": "" }, "require": { @@ -4276,7 +4275,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.20" + "source": "https://github.com/symfony/debug/tree/v4.4.22" }, "funding": [ { @@ -4292,7 +4291,7 @@ "type": "tidelift" } ], - "time": "2021-01-28T16:54:48+00:00" + "time": "2021-04-02T07:50:12+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4363,16 +4362,16 @@ }, { "name": "symfony/error-handler", - "version": "v4.4.21", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "48e81a375525872e788c2418430f54150d935810" + "reference": "76603a8df8e001436df80758eb03a8baa5324175" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/48e81a375525872e788c2418430f54150d935810", - "reference": "48e81a375525872e788c2418430f54150d935810", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/76603a8df8e001436df80758eb03a8baa5324175", + "reference": "76603a8df8e001436df80758eb03a8baa5324175", "shasum": "" }, "require": { @@ -4412,7 +4411,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v4.4.21" + "source": "https://github.com/symfony/error-handler/tree/v4.4.22" }, "funding": [ { @@ -4428,7 +4427,7 @@ "type": "tidelift" } ], - "time": "2021-03-08T10:28:40+00:00" + "time": "2021-04-02T07:50:12+00:00" }, { "name": "symfony/event-dispatcher", @@ -4733,16 +4732,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.20", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "02d968647fe61b2f419a8dc70c468a9d30a48d3a" + "reference": "1a6f87ef99d05b1bf5c865b4ef7992263e1cb081" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/02d968647fe61b2f419a8dc70c468a9d30a48d3a", - "reference": "02d968647fe61b2f419a8dc70c468a9d30a48d3a", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1a6f87ef99d05b1bf5c865b4ef7992263e1cb081", + "reference": "1a6f87ef99d05b1bf5c865b4ef7992263e1cb081", "shasum": "" }, "require": { @@ -4781,7 +4780,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v4.4.20" + "source": "https://github.com/symfony/http-foundation/tree/v4.4.22" }, "funding": [ { @@ -4797,20 +4796,20 @@ "type": "tidelift" } ], - "time": "2021-02-25T17:11:33+00:00" + "time": "2021-04-30T12:05:50+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.21", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "0248214120d00c5f44f1cd5d9ad65f0b38459333" + "reference": "cd2e325fc34a4a5bbec91eecf69dda8ee8c5ea4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/0248214120d00c5f44f1cd5d9ad65f0b38459333", - "reference": "0248214120d00c5f44f1cd5d9ad65f0b38459333", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/cd2e325fc34a4a5bbec91eecf69dda8ee8c5ea4f", + "reference": "cd2e325fc34a4a5bbec91eecf69dda8ee8c5ea4f", "shasum": "" }, "require": { @@ -4885,7 +4884,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v4.4.21" + "source": "https://github.com/symfony/http-kernel/tree/v4.4.22" }, "funding": [ { @@ -4901,20 +4900,20 @@ "type": "tidelift" } ], - "time": "2021-03-29T05:11:04+00:00" + "time": "2021-05-01T14:38:48+00:00" }, { "name": "symfony/mime", - "version": "v5.2.6", + "version": "v5.2.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "1b2092244374cbe48ae733673f2ca0818b37197b" + "reference": "7af452bf51c46f18da00feb32e1ad36db9426515" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/1b2092244374cbe48ae733673f2ca0818b37197b", - "reference": "1b2092244374cbe48ae733673f2ca0818b37197b", + "url": "https://api.github.com/repos/symfony/mime/zipball/7af452bf51c46f18da00feb32e1ad36db9426515", + "reference": "7af452bf51c46f18da00feb32e1ad36db9426515", "shasum": "" }, "require": { @@ -4968,7 +4967,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.2.6" + "source": "https://github.com/symfony/mime/tree/v5.2.7" }, "funding": [ { @@ -4984,7 +4983,7 @@ "type": "tidelift" } ], - "time": "2021-03-12T13:18:39+00:00" + "time": "2021-04-29T20:47:09+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5636,16 +5635,16 @@ }, { "name": "symfony/process", - "version": "v4.4.20", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a" + "reference": "f5481b22729d465acb1cea3455fc04ce84b0148b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/7e950b6366d4da90292c2e7fa820b3c1842b965a", - "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a", + "url": "https://api.github.com/repos/symfony/process/zipball/f5481b22729d465acb1cea3455fc04ce84b0148b", + "reference": "f5481b22729d465acb1cea3455fc04ce84b0148b", "shasum": "" }, "require": { @@ -5677,7 +5676,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.20" + "source": "https://github.com/symfony/process/tree/v4.4.22" }, "funding": [ { @@ -5693,20 +5692,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T09:09:26+00:00" + "time": "2021-04-07T16:22:29+00:00" }, { "name": "symfony/routing", - "version": "v4.4.20", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "69919991c845b34626664ddc9b3aef9d09d2a5df" + "reference": "049e7c5c41f98511959668791b4adc0898a821b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/69919991c845b34626664ddc9b3aef9d09d2a5df", - "reference": "69919991c845b34626664ddc9b3aef9d09d2a5df", + "url": "https://api.github.com/repos/symfony/routing/zipball/049e7c5c41f98511959668791b4adc0898a821b3", + "reference": "049e7c5c41f98511959668791b4adc0898a821b3", "shasum": "" }, "require": { @@ -5765,7 +5764,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v4.4.20" + "source": "https://github.com/symfony/routing/tree/v4.4.22" }, "funding": [ { @@ -5781,7 +5780,7 @@ "type": "tidelift" } ], - "time": "2021-02-22T15:37:04+00:00" + "time": "2021-04-11T12:59:39+00:00" }, { "name": "symfony/service-contracts", @@ -6030,16 +6029,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.21", + "version": "v4.4.22", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806" + "reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806", - "reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c194bcedde6295f3ec3e9eba1f5d484ea97c41a7", + "reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7", "shasum": "" }, "require": { @@ -6099,7 +6098,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.21" + "source": "https://github.com/symfony/var-dumper/tree/v4.4.22" }, "funding": [ { @@ -6115,7 +6114,7 @@ "type": "tidelift" } ], - "time": "2021-03-27T19:49:03+00:00" + "time": "2021-04-19T13:36:17+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -6546,20 +6545,21 @@ }, { "name": "composer/composer", - "version": "2.0.12", + "version": "2.0.13", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "6c12ce263da71641903e399c3ce8ecb08fd375fb" + "reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/6c12ce263da71641903e399c3ce8ecb08fd375fb", - "reference": "6c12ce263da71641903e399c3ce8ecb08fd375fb", + "url": "https://api.github.com/repos/composer/composer/zipball/986e8b86b7b570632ad0a905c3726c33dd4c0efb", + "reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", + "composer/metadata-minifier": "^1.0", "composer/semver": "^3.0", "composer/spdx-licenses": "^1.2", "composer/xdebug-handler": "^1.1", @@ -6623,7 +6623,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.0.12" + "source": "https://github.com/composer/composer/tree/2.0.13" }, "funding": [ { @@ -6639,7 +6639,76 @@ "type": "tidelift" } ], - "time": "2021-04-01T08:14:59+00:00" + "time": "2021-04-27T11:11:08+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" }, { "name": "composer/semver", @@ -7382,16 +7451,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.4", + "version": "v4.10.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", "shasum": "" }, "require": { @@ -7432,9 +7501,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" }, - "time": "2020-12-20T10:01:03+00:00" + "time": "2021-05-03T19:11:20+00:00" }, { "name": "phar-io/manifest", @@ -9449,16 +9518,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.2.6", + "version": "v5.2.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "8c86a82f51658188119e62cff0a050a12d09836f" + "reference": "056e92acc21d977c37e6ea8e97374b2a6c8551b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/8c86a82f51658188119e62cff0a050a12d09836f", - "reference": "8c86a82f51658188119e62cff0a050a12d09836f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/056e92acc21d977c37e6ea8e97374b2a6c8551b0", + "reference": "056e92acc21d977c37e6ea8e97374b2a6c8551b0", "shasum": "" }, "require": { @@ -9491,7 +9560,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.2.6" + "source": "https://github.com/symfony/filesystem/tree/v5.2.7" }, "funding": [ { @@ -9507,7 +9576,7 @@ "type": "tidelift" } ], - "time": "2021-03-28T14:30:26+00:00" + "time": "2021-04-01T10:42:13+00:00" }, { "name": "theseer/tokenizer", From 43b66331830713ddac84a5b61848e992edd064b6 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 3 May 2021 23:59:52 +0100 Subject: [PATCH 12/22] Filtered scripts in custom HTML head for exports Since it appeared to cause problems in some scenarios. Related to #2490 --- app/Entities/Tools/PageContent.php | 64 +---------------- app/Http/Controllers/HomeController.php | 2 +- app/Util/HtmlContentFilter.php | 71 +++++++++++++++++++ resources/views/books/export.blade.php | 2 +- resources/views/chapters/export.blade.php | 2 +- resources/views/pages/export.blade.php | 2 +- .../partials/custom-head-content.blade.php | 5 -- .../views/partials/custom-head.blade.php | 6 +- .../partials/export-custom-head.blade.php | 5 ++ tests/Entity/ExportTest.php | 16 +++++ 10 files changed, 101 insertions(+), 74 deletions(-) create mode 100644 app/Util/HtmlContentFilter.php delete mode 100644 resources/views/partials/custom-head-content.blade.php create mode 100644 resources/views/partials/export-custom-head.blade.php diff --git a/app/Entities/Tools/PageContent.php b/app/Entities/Tools/PageContent.php index 82499cdf2..ff502d164 100644 --- a/app/Entities/Tools/PageContent.php +++ b/app/Entities/Tools/PageContent.php @@ -4,6 +4,7 @@ use BookStack\Entities\Models\Page; use BookStack\Entities\Tools\Markdown\CustomStrikeThroughExtension; use BookStack\Facades\Theme; use BookStack\Theming\ThemeEvents; +use BookStack\Util\HtmlContentFilter; use DOMDocument; use DOMNodeList; use DOMXPath; @@ -169,7 +170,7 @@ class PageContent $content = $this->page->html; if (!config('app.allow_content_scripts')) { - $content = $this->escapeScripts($content); + $content = HtmlContentFilter::removeScripts($content); } if ($blankIncludes) { @@ -308,65 +309,4 @@ class PageContent return $innerContent; } - - /** - * Escape script tags within HTML content. - */ - protected function escapeScripts(string $html) : string - { - if (empty($html)) { - return $html; - } - - libxml_use_internal_errors(true); - $doc = new DOMDocument(); - $doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); - $xPath = new DOMXPath($doc); - - // Remove standard script tags - $scriptElems = $xPath->query('//script'); - foreach ($scriptElems as $scriptElem) { - $scriptElem->parentNode->removeChild($scriptElem); - } - - // Remove clickable links to JavaScript URI - $badLinks = $xPath->query('//*[contains(@href, \'javascript:\')]'); - foreach ($badLinks as $badLink) { - $badLink->parentNode->removeChild($badLink); - } - - // Remove forms with calls to JavaScript URI - $badForms = $xPath->query('//*[contains(@action, \'javascript:\')] | //*[contains(@formaction, \'javascript:\')]'); - foreach ($badForms as $badForm) { - $badForm->parentNode->removeChild($badForm); - } - - // Remove meta tag to prevent external redirects - $metaTags = $xPath->query('//meta[contains(@content, \'url\')]'); - foreach ($metaTags as $metaTag) { - $metaTag->parentNode->removeChild($metaTag); - } - - // Remove data or JavaScript iFrames - $badIframes = $xPath->query('//*[contains(@src, \'data:\')] | //*[contains(@src, \'javascript:\')] | //*[@srcdoc]'); - foreach ($badIframes as $badIframe) { - $badIframe->parentNode->removeChild($badIframe); - } - - // Remove 'on*' attributes - $onAttributes = $xPath->query('//@*[starts-with(name(), \'on\')]'); - foreach ($onAttributes as $attr) { - /** @var \DOMAttr $attr*/ - $attrName = $attr->nodeName; - $attr->parentNode->removeAttribute($attrName); - } - - $html = ''; - $topElems = $doc->documentElement->childNodes->item(0)->childNodes; - foreach ($topElems as $child) { - $html .= $doc->saveHTML($child); - } - - return $html; - } } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 31736e1b0..1ffb99f8d 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -105,7 +105,7 @@ class HomeController extends Controller */ public function customHeadContent() { - return view('partials.custom-head-content'); + return view('partials.custom-head'); } /** diff --git a/app/Util/HtmlContentFilter.php b/app/Util/HtmlContentFilter.php new file mode 100644 index 000000000..cec927a3c --- /dev/null +++ b/app/Util/HtmlContentFilter.php @@ -0,0 +1,71 @@ +loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); + $xPath = new DOMXPath($doc); + + // Remove standard script tags + $scriptElems = $xPath->query('//script'); + static::removeNodes($scriptElems); + + // Remove clickable links to JavaScript URI + $badLinks = $xPath->query('//*[contains(@href, \'javascript:\')]'); + static::removeNodes($badLinks); + + // Remove forms with calls to JavaScript URI + $badForms = $xPath->query('//*[contains(@action, \'javascript:\')] | //*[contains(@formaction, \'javascript:\')]'); + static::removeNodes($badForms); + + // Remove meta tag to prevent external redirects + $metaTags = $xPath->query('//meta[contains(@content, \'url\')]'); + static::removeNodes($metaTags); + + // Remove data or JavaScript iFrames + $badIframes = $xPath->query('//*[contains(@src, \'data:\')] | //*[contains(@src, \'javascript:\')] | //*[@srcdoc]'); + static::removeNodes($badIframes); + + // Remove 'on*' attributes + $onAttributes = $xPath->query('//@*[starts-with(name(), \'on\')]'); + foreach ($onAttributes as $attr) { + /** @var \DOMAttr $attr*/ + $attrName = $attr->nodeName; + $attr->parentNode->removeAttribute($attrName); + } + + $html = ''; + $topElems = $doc->documentElement->childNodes->item(0)->childNodes; + foreach ($topElems as $child) { + $html .= $doc->saveHTML($child); + } + + return $html; + } + + /** + * Removed all of the given DOMNodes. + */ + static protected function removeNodes(DOMNodeList $nodes): void + { + foreach ($nodes as $node) { + $node->parentNode->removeChild($node); + } + } + +} \ No newline at end of file diff --git a/resources/views/books/export.blade.php b/resources/views/books/export.blade.php index f62b89582..1faa3880e 100644 --- a/resources/views/books/export.blade.php +++ b/resources/views/books/export.blade.php @@ -27,7 +27,7 @@ } @yield('head') - @include('partials.custom-head') + @include('partials.export-custom-head') diff --git a/resources/views/chapters/export.blade.php b/resources/views/chapters/export.blade.php index 506e8db3d..96d9d7700 100644 --- a/resources/views/chapters/export.blade.php +++ b/resources/views/chapters/export.blade.php @@ -19,7 +19,7 @@ } } - @include('partials.custom-head') + @include('partials.export-custom-head') diff --git a/resources/views/pages/export.blade.php b/resources/views/pages/export.blade.php index 47a4d870a..1f2e60576 100644 --- a/resources/views/pages/export.blade.php +++ b/resources/views/pages/export.blade.php @@ -29,7 +29,7 @@ @endif - @include('partials.custom-head') + @include('partials.export-custom-head') diff --git a/resources/views/partials/custom-head-content.blade.php b/resources/views/partials/custom-head-content.blade.php deleted file mode 100644 index b245b7ad6..000000000 --- a/resources/views/partials/custom-head-content.blade.php +++ /dev/null @@ -1,5 +0,0 @@ -@if(setting('app-custom-head', false)) - - {!! setting('app-custom-head') !!} - -@endif \ No newline at end of file diff --git a/resources/views/partials/custom-head.blade.php b/resources/views/partials/custom-head.blade.php index dd7cc41e4..fa5ba0cc4 100644 --- a/resources/views/partials/custom-head.blade.php +++ b/resources/views/partials/custom-head.blade.php @@ -1,5 +1,5 @@ @if(setting('app-custom-head') && \Route::currentRouteName() !== 'settings') - - {!! setting('app-custom-head') !!} - + +{!! setting('app-custom-head') !!} + @endif \ No newline at end of file diff --git a/resources/views/partials/export-custom-head.blade.php b/resources/views/partials/export-custom-head.blade.php new file mode 100644 index 000000000..f428e9fe9 --- /dev/null +++ b/resources/views/partials/export-custom-head.blade.php @@ -0,0 +1,5 @@ +@if(setting('app-custom-head')) + +{!! \BookStack\Util\HtmlContentFilter::removeScripts(setting('app-custom-head')) !!} + +@endif \ No newline at end of file diff --git a/tests/Entity/ExportTest.php b/tests/Entity/ExportTest.php index 05672c6ca..d04ccc69a 100644 --- a/tests/Entity/ExportTest.php +++ b/tests/Entity/ExportTest.php @@ -1,5 +1,6 @@ assertSee('src="/uploads/svg_test.svg"'); } + public function test_exports_removes_scripts_from_custom_head() + { + $entities = [ + Page::query()->first(), Chapter::query()->first(), Book::query()->first(), + ]; + setting()->put('app-custom-head', ''); + + foreach ($entities as $entity) { + $resp = $this->asEditor()->get($entity->getUrl('/export/html')); + $resp->assertDontSee('window.donkey'); + $resp->assertDontSee('script'); + $resp->assertSee('.my-test-class { color: red; }'); + } + } + } From 95798a2ebacc617c5883aa0473e474fdfe4f2f8c Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Tue, 4 May 2021 23:15:05 +0100 Subject: [PATCH 13/22] Standardised export views with base layout, Reduced included export styles Related to #2666 --- resources/sass/export-styles.scss | 24 +++++++-- resources/views/books/export.blade.php | 42 ++------------- resources/views/chapters/export.blade.php | 34 ++---------- resources/views/export-layout.blade.php | 15 ++++++ resources/views/pages/export.blade.php | 54 +++---------------- .../views/partials/export-styles.blade.php | 21 ++++++++ 6 files changed, 73 insertions(+), 117 deletions(-) create mode 100644 resources/views/export-layout.blade.php diff --git a/resources/sass/export-styles.scss b/resources/sass/export-styles.scss index 278e5b6c5..b8682ed05 100644 --- a/resources/sass/export-styles.scss +++ b/resources/sass/export-styles.scss @@ -1,16 +1,13 @@ @import "variables"; @import "mixins"; -@import "spacing"; @import "html"; @import "text"; @import "layout"; @import "blocks"; @import "tables"; -@import "header"; @import "lists"; @import "pages"; - html, body { background-color: #FFF; } @@ -40,4 +37,25 @@ pre:after { } pre code { white-space: pre-wrap; +} + +.page-break { + page-break-after: always; +} +@media screen { + .page-break { + border-top: 1px solid #DDD; + } +} + +ul.contents ul li { + list-style: circle; +} + +.chapter-hint { + color: #888; + margin-top: 32px; +} +.chapter-hint + h1 { + margin-top: 0; } \ No newline at end of file diff --git a/resources/views/books/export.blade.php b/resources/views/books/export.blade.php index 1faa3880e..9cd5618a5 100644 --- a/resources/views/books/export.blade.php +++ b/resources/views/books/export.blade.php @@ -1,38 +1,8 @@ - - - - - {{ $book->name }} +@extends('export-layout') - @include('partials.export-styles', ['format' => $format]) - - - @yield('head') - @include('partials.export-custom-head') - - - -
+@section('title', $book->name) +@section('content')

{{$book->name}}

{{ $book->description }}

@@ -73,8 +43,4 @@ @endif @endforeach - -
- - - +@endsection \ No newline at end of file diff --git a/resources/views/chapters/export.blade.php b/resources/views/chapters/export.blade.php index 96d9d7700..18f056f27 100644 --- a/resources/views/chapters/export.blade.php +++ b/resources/views/chapters/export.blade.php @@ -1,30 +1,8 @@ - - - - - {{ $chapter->name }} +@extends('export-layout') - @include('partials.export-styles', ['format' => $format]) - - - @include('partials.export-custom-head') - - - -
+@section('title', $chapter->name) +@section('content')

{{$chapter->name}}

{{ $chapter->description }}

@@ -42,8 +20,4 @@

{{ $page->name }}

{!! $page->html !!} @endforeach - -
- - - +@endsection \ No newline at end of file diff --git a/resources/views/export-layout.blade.php b/resources/views/export-layout.blade.php new file mode 100644 index 000000000..f23b3cca5 --- /dev/null +++ b/resources/views/export-layout.blade.php @@ -0,0 +1,15 @@ + + + + + @yield('title') + + @include('partials.export-styles', ['format' => $format]) + @include('partials.export-custom-head') + + +
+ @yield('content') +
+ + \ No newline at end of file diff --git a/resources/views/pages/export.blade.php b/resources/views/pages/export.blade.php index 1f2e60576..74d17c128 100644 --- a/resources/views/pages/export.blade.php +++ b/resources/views/pages/export.blade.php @@ -1,51 +1,13 @@ - - - - - {{ $page->name }} +@extends('export-layout') - @include('partials.export-styles', ['format' => $format]) +@section('title', $page->name) - @if($format === 'pdf') - - @endif - - @include('partials.export-custom-head') - - - -
-
- - @include('pages.page-display') - -
- -
- @include('partials.entity-export-meta', ['entity' => $page]) -
+
+
+ @include('partials.entity-export-meta', ['entity' => $page])
-
- - - +@endsection \ No newline at end of file diff --git a/resources/views/partials/export-styles.blade.php b/resources/views/partials/export-styles.blade.php index 52bfda2a6..967dc19ec 100644 --- a/resources/views/partials/export-styles.blade.php +++ b/resources/views/partials/export-styles.blade.php @@ -6,6 +6,27 @@ @if ($format === 'pdf')