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

Image crossOrigin="use-credentials" does not work in preview #6463

Open
csvance opened this issue Oct 3, 2024 · 0 comments · May be fixed by #6509
Open

Image crossOrigin="use-credentials" does not work in preview #6463

csvance opened this issue Oct 3, 2024 · 0 comments · May be fixed by #6509

Comments

@csvance
Copy link

csvance commented Oct 3, 2024

Describe the bug

When using crossOrigin="use-credentials" for the Image, previews of the image still use crossorigin="anonymous" and fail to load from cross origin sources where authentication is required.

To Reproduce

  1. Setup the labeling interface to use credentials for CORS:
<View>
  <Image name="image" value="$img" crossOrigin="use-credentials"/>
  <Choices name="choice" toName="image">
    <Choice value="Dogs"/>
    <Choice value="Cats" />
  </Choices>
</View>
  1. Import an image dataset which uses HTTP to load the images. To reproduce you can import the following simple CSV, the image can be fake because the bug is in the <img> crossorigin attribute, it doesn't require real images or correctly configured CORS to demonstrate that its broken:
img
http://completely-fake-domain.fake/test.jpg
  1. Open project interface to show the list of images
  2. Inspect the image preview, observe how it has crossorigin="anonymous" instead of "use-credentials"

Expected behavior
Preview <img> should use same crossorigin settings as the <img> in the labeling interface

Docker Image:

{
  "release": "1.13.1",
  "label-studio-os-package": {
    "version": "1.13.1",
    "short_version": "1.13",
    "latest_version_from_pypi": "1.13.1",
    "latest_version_upload_time": "2024-08-20T17:38:07",
    "current_version_is_outdated": false
  },

  "label-studio-os-backend": {
    "message": "ci: Build frontend",
    "commit": "d9b816a3781ee806bba50c8c5589fcdb8555a277",
    "date": "2024/08/19 19:14:23",
    "branch": "",
    "version": "1.13.1+0.gd9b816a"
  },

  "label-studio-frontend": {
    "message": "fix: LEAP-762: Fix offsets in domManager for emojis (#6135)",
    "commit": "8d8a7fce72b808d00f94cc10b49669121d186c1f",
    "date": "2024-08-01T03:08:02.000Z",
    "branch": "develop"
  },

  "dm2": {
    "message": "chore: OPTIC-866: Stylus to Sass conversion LS web/libs/datamanager/sr ...",
    "commit": "8fbedaa6fdd00338da19c258a798b8799f0cd935",
    "date": "2024-07-26T15:12:41.000Z",
    "branch": "develop"
  },

  "label-studio-converter": {
    "version": "1.0.5"
  }
}
@cemdrk cemdrk linked a pull request Oct 14, 2024 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant