Open pgy866 opened 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.
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 重启,回收应用程序池,以及站点内重启租户,问题依旧存在,如果是英文名称,则没有任何问题
What does the log say?
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.
If it's really caused by that, https://github.com/OrchardCMS/OrchardCore/issues/1610 might be a good way to solve this issue.
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.
@pgy866 can you reproduce this with the latest bits?
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."Create Name Tenant, whether it can consider adding "Display Name", "Technical Name", separate, and "Display Name" as the subsequent localization field
创建名称租户,是否可以考虑添加“显示名称”,“技术名称”分开,“显示名称”作为日后的本地化字段