mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
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:
parent
f53597845e
commit
918d3b46f0
2 changed files with 3 additions and 0 deletions
|
@ -53,6 +53,8 @@ namespace BTCPayServer.Services
|
||||||
|
|
||||||
public Language FindLanguageInAcceptLanguageHeader(string acceptLanguageHeader)
|
public Language FindLanguageInAcceptLanguageHeader(string acceptLanguageHeader)
|
||||||
{
|
{
|
||||||
|
if (acceptLanguageHeader is null)
|
||||||
|
return null;
|
||||||
IDictionary<string, float> acceptedLocales = new Dictionary<string, float>();
|
IDictionary<string, float> acceptedLocales = new Dictionary<string, float>();
|
||||||
var locales = acceptLanguageHeader.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
var locales = acceptLanguageHeader.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||||
for (int i = 0; i < locales.Length; i++)
|
for (int i = 0; i < locales.Length; i++)
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
* Lightning payments should not be proposed for top-up invoices (#2772, #2780) @ubolator
|
* Lightning payments should not be proposed for top-up invoices (#2772, #2780) @ubolator
|
||||||
* Typo fixes (#2774) @jorisvial
|
* Typo fixes (#2774) @jorisvial
|
||||||
* Fix payjoin client to properly handle receiver using output substitution (#2677) @NicolasDorier
|
* 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
|
## 1.2.1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue