OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.45k stars 2.41k forks source link

Create Localized Name Tenant, An error occured while executing this request! #1658

Open pgy866 opened 6 years ago

pgy866 commented 6 years ago

1.Create Tenant 2.Name <If this name is "Chinese", other languages are not tested> Here is the cause of the error The name of the tenant. 3.setup 4.Tenants /admin account 5: "An error occurred while executing this request."

1.创建租户
2.Name <这里名字如果是“中文”,其它语言未测试>**这里是造成错误的原因**
`租客的名字.`
3.设置
4.登陆租户 /管理员帐户
5:出现错误“执行此请求时发生错误。”

Create Name Tenant, whether it can consider adding "Display Name", "Technical Name", separate, and "Display Name" as the subsequent localization field 创建名称租户,是否可以考虑添加“显示名称”,“技术名称”分开,“显示名称”作为日后的本地化字段 1

Skrypt commented 6 years ago

I don't think it's related with chinese names. It's probably just a bug with the tenants initialization after setup. Try restarting the website to see if it still does the same error. Also please provide which branch/commit you are on.

pgy866 commented 6 years ago

Nightly (dev): 1.0.0-beta2-5122

IIS restarts, recycles the application pool, and restarts the tenant within the site. The problem persists. If it is an English name, there is no problem IIS 重启,回收应用程序池,以及站点内重启租户,问题依旧存在,如果是英文名称,则没有任何问题 1

sebastienros commented 6 years ago

What does the log say?

kevinchalet commented 6 years ago

Given that it happens just after logging in, I'm tempted to say that's because OC returns a cookie containing the name of the tenant (in this case, orchauth_[name of the tenant]). HTTP request/response headers can't contain non-ASCII characters, so if your tenant uses such characters, it will fail when returning the response.

kevinchalet commented 6 years ago

If it's really caused by that, https://github.com/OrchardCMS/OrchardCore/issues/1610 might be a good way to solve this issue.

pgy866 commented 6 years ago

orchard-log-2018-04-04.log

sebastienros commented 6 years ago

I think we should add some validation for the tenant name as it might be used for technical values like filenames and so on. The issue mentioned by @PinpointTownes was about security, it would also fix it but we want to be able to use a friendly name in some technical parts, like folders.

hishamco commented 5 years ago

@pgy866 can you reproduce this with the latest bits?