Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[browser] Fix custom icu fingerprinting. #108011

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Sep 19, 2024

Using custom ICU files got broken with fingerprinting.
Repro:

<BlazorIcuDataFileName>/workspaces/runtime/artifacts-samples/browser/icudt_custom.dat</BlazorIcuDataFileName>

produces boot.config.json:

  "mainAssemblyName": "browser",
  "resources": {
    "hash": "sha256-mDtUMfPuXPyYADO8g8Kk3TOZPMhbHv/IMatrIfcVy8M=",
    "fingerprinting": {
         ...........
        "icudt_custom.oh1zvcfom8.dat": "icudt_custom.dat",
     },
    "icu": {
      "icudt_custom.oh1zvcfom8.dat": "sha256-tO5O5YzMTVSaKBboxAqezOQL9ewmupzV2JrB5Rkc8a4="
    },
   }
  "globalizationMode": "custom"

fileMapping has contents: mapping={ "icudt_custom.dat": "icudt_custom.oh1zvcfom8.dat" }
icuFile has a value icudt_custom.oh1zvcfom8.dat.
So we won't enter the condition:

        if (icuFile && fileMapping[icuFile]) {
            return fileMapping[icuFile];
        }

and would finish with invariant mode that prevents globalization methods from working.

ToDo:
should be backported to net9.

@ilonatommy
Copy link
Member Author

/backport to release/9.0-rc2

Copy link
Contributor

Started backporting to release/9.0-rc2: https:/dotnet/runtime/actions/runs/10944660037

@tarekgh tarekgh added the arch-wasm WebAssembly architecture label Sep 23, 2024
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
* Fix custom icu fingerprinting.

* Update src/mono/browser/runtime/loader/icu.ts

Co-authored-by: Pavel Savara <[email protected]>

---------

Co-authored-by: Pavel Savara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants