The checkout would crash for some client if automatic detection of language was checked, and the browser was not setting the accepted language

This commit is contained in:
nicolas.dorier 2021-08-31 16:01:16 +09:00
parent f53597845e
commit 918d3b46f0
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 3 additions and 0 deletions

View file

@ -53,6 +53,8 @@ namespace BTCPayServer.Services
public Language FindLanguageInAcceptLanguageHeader(string acceptLanguageHeader)
{
if (acceptLanguageHeader is null)
return null;
IDictionary<string, float> acceptedLocales = new Dictionary<string, float>();
var locales = acceptLanguageHeader.Split(',', StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < locales.Length; i++)

View file

@ -11,6 +11,7 @@
* Lightning payments should not be proposed for top-up invoices (#2772, #2780) @ubolator
* Typo fixes (#2774) @jorisvial
* Fix payjoin client to properly handle receiver using output substitution (#2677) @NicolasDorier
* The checkout would crash for some client if automatic detection of language was checked, and the browser was not setting the accepted language @NicolasDorier
## 1.2.1