Skip to content

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.

Co-authored-by: Pavel Savara <pavelsavara@microsoft.com>
@ilonatommy
Copy link
Member Author

/backport to release/9.0-rc2

@github-actions
Copy link
Contributor

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

@tarekgh tarekgh added the arch-wasm WebAssembly architecture label Sep 23, 2024
@dotnet-policy-service
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 <pavelsavara@microsoft.com>

---------

Co-authored-by: Pavel Savara <pavelsavara@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants