From f53283576db121e4356ad2f78ef94d2e553cbfb6 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Fri, 21 Jan 2022 15:50:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- options/locale/locale_en-US.ini | 2 +- options/locale/locale_zh-CN.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 40e64cb06..079df6b9d 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -394,7 +394,7 @@ lang_select_error = Select a language from the list. username_been_taken = The username is already taken. repo_name_been_taken = The repository name or path is already used. -course_name_been_taken=The course path is already used. +course_name_been_taken=The course name or path is already used. visit_rate_limit = Remote visit addressed rate limitation. 2fa_auth_required = Remote visit required two factors authentication. org_name_been_taken = The organization name is already taken. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 688712996..350e7cefa 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -399,7 +399,7 @@ lang_select_error=从列表中选出语言 username_been_taken=用户名已被使用。 repo_name_been_taken=项目名称或项目路径已被使用。 -course_name_been_taken=课程名称或路径已被使用。 +course_name_been_taken=课程名称或地址已被使用。 visit_rate_limit=远程访问达到速度限制。 2fa_auth_required=远程访问需要双重验证。 org_name_been_taken=组织名称已被使用。 From 71d279930f796adc762529fcaa45e6d4f9a39aa1 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Fri, 21 Jan 2022 17:57:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=BB=E6=8E=89iframe=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/context/context.go | 6 +----- modules/setting/setting.go | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/context/context.go b/modules/context/context.go index 653a1895f..fd980fc6d 100755 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -328,11 +328,7 @@ func Contexter() macaron.Handler { } } - if setting.IFrameURL != "" { - ctx.Resp.Header().Set(`X-Frame-Options`, `ALLOW-FROM `+setting.IFrameURL) - } else { - ctx.Resp.Header().Set(`X-Frame-Options`, `SAMEORIGIN`) - } + //ctx.Resp.Header().Set(`X-Frame-Options`, `SAMEORIGIN`) ctx.Data["CsrfToken"] = html.EscapeString(x.GetToken()) ctx.Data["CsrfTokenHtml"] = template.HTML(``) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 5775ca552..8622938e6 100755 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -573,7 +573,6 @@ var ( OrgName string TeamName string }{} - IFrameURL string ) // DateLang transforms standard language locale name to corresponding value in datetime plugin. @@ -1341,8 +1340,7 @@ func NewContext() { sec = Cfg.Section("course") Course.OrgName = sec.Key("org_name").MustString("") Course.TeamName = sec.Key("team_name").MustString("") - sec = Cfg.Section("xFrame") - IFrameURL = sec.Key("url").MustString("") + } func SetRadarMapConfig() {