Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. object vs img

object vs img

Scheduled Pinned Locked Moved Web Development
questionvisual-studiosysadminsecurityjson
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    V 0
    wrote on last edited by
    #1

    We have a weird situation for one of our products. We serve a webpage that's behind a third-party SSO (openAM). This webpage is created by using several components (images/json/graphs/...) from our own server behind that same SSO. Those object are doing fine. However, there are also images served from another server, not under our control, but behind that same SSO. The weird thing is that images do not come through correctly. That is, if you first access the image directly and than through the files, it works, otherwise the image will not show. We have made a workaround that shows the image directly, by using an "object" tag instead of an img tag, but we would like to change that. We think this has to do with the client needing an additional authentication at the other server (and perhaps a switch from http to https, back to http again) But I can't find anything on the internet about this. My question is first and foremost, what could cause this behavior? (If an SSO change is needed, we need to have solid arguments towards our clients.) And secondly, do you know of a solution? thanks! WORKFLOW: 1. client requests page on our server 2. client is redirected to login page (and fills in credentials) 3. login credentials checked on server and page is served towards client with all objects of this server correctly on the page 4. *client browser detects some objects are from another server and requests those objects with the credentials passed in step 2 5. *credentials are checked on the other server and the server redirects to the requested urls (something here doesn't work correctly?) *step 4 and 5 is what w expect or what we think happens.

    V.

    Richard DeemingR 1 Reply Last reply
    0
    • V V 0

      We have a weird situation for one of our products. We serve a webpage that's behind a third-party SSO (openAM). This webpage is created by using several components (images/json/graphs/...) from our own server behind that same SSO. Those object are doing fine. However, there are also images served from another server, not under our control, but behind that same SSO. The weird thing is that images do not come through correctly. That is, if you first access the image directly and than through the files, it works, otherwise the image will not show. We have made a workaround that shows the image directly, by using an "object" tag instead of an img tag, but we would like to change that. We think this has to do with the client needing an additional authentication at the other server (and perhaps a switch from http to https, back to http again) But I can't find anything on the internet about this. My question is first and foremost, what could cause this behavior? (If an SSO change is needed, we need to have solid arguments towards our clients.) And secondly, do you know of a solution? thanks! WORKFLOW: 1. client requests page on our server 2. client is redirected to login page (and fills in credentials) 3. login credentials checked on server and page is served towards client with all objects of this server correctly on the page 4. *client browser detects some objects are from another server and requests those objects with the credentials passed in step 2 5. *credentials are checked on the other server and the server redirects to the requested urls (something here doesn't work correctly?) *step 4 and 5 is what w expect or what we think happens.

      V.

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      V. wrote:

      if you first access the image directly and than through the files, it works, otherwise the image will not show.

      It almost sounds like the other server is checking the HTTP_REFERER header, and refusing to serve the image if it looks like it's embedded in another site. If you load it directly first, no referrer header will be sent, and the image will be cached, which is why it then works in your page. Try clearing your cache, then loading a page on your site which links to the image with an <a> tag, rather than embedding it. If you click on the link, does the image load? Try using something like Fiddler[^] to compare the requests that don't work to those that do, to see if there's any other obvious differences.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      V 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        V. wrote:

        if you first access the image directly and than through the files, it works, otherwise the image will not show.

        It almost sounds like the other server is checking the HTTP_REFERER header, and refusing to serve the image if it looks like it's embedded in another site. If you load it directly first, no referrer header will be sent, and the image will be cached, which is why it then works in your page. Try clearing your cache, then loading a page on your site which links to the image with an <a> tag, rather than embedding it. If you click on the link, does the image load? Try using something like Fiddler[^] to compare the requests that don't work to those that do, to see if there's any other obvious differences.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #3

        Thanks! I'll look into it. (I'm already using fiddler ;-)) I just made a test page that requests the image through a object tag and the same through an img tag. The result was that the object tag loaded, but the image tag did not. After hitting F5, both loaded. Now I have to wait until I'm logged out, before I can launch Fiddler on it (there is no logout option, ... don't ask :sigh: )

        V.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups