stash icon indicating copy to clipboard operation
stash copied to clipboard

[Bug Report] URLs for transcoded streams don't have apikey query param

Open o-fl0w opened this issue 3 years ago • 1 comments

Describe the bug In secure stash instance streams can be accessed by using the stream url with the query param apikey added. When asking /graphql for those urls only the direct stream has the apikey added, the transcoded ones do not - even though it seem like they should.

To Reproduce In a secure stash instance run following query replacing the id with an existing one:

{
  findScene(id:523){
    paths{stream},
    sceneStreams{url},
  }
}

Response is:

{
  "data": {
    "findScene": {
      "paths": {
        "stream": "http://192.168.66.6:9999/scene/523/stream?apikey=XXXREDACTXXX"
      },
      "sceneStreams": [
        {
          "url": "http://192.168.66.6:9999/scene/523/stream"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.mkv"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.webm?resolution=FOUR_K"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.webm?resolution=FULL_HD"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.webm?resolution=STANDARD_HD"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.webm?resolution=STANDARD"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.webm?resolution=LOW"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.mp4?resolution=FOUR_K"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.mp4?resolution=FULL_HD"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.mp4?resolution=STANDARD_HD"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.mp4?resolution=STANDARD"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.mp4?resolution=LOW"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.webm"
        },
        {
          "url": "http://192.168.66.6:9999/scene/523/stream.m3u8"
        }
      ]
    }
  }
}

findScene.paths.stream correctly has apikey added. All transcoded streams in sceneStreams don't, even though they do work if you manually add the apikey param.

Expected behavior Transcoded stream urls returned by queries to /graphql should have apikey param added in secure instances of stash.

Stash Version: (from Settings -> About): v0.16.1

o-fl0w avatar Sep 08 '22 14:09 o-fl0w

Same also goes for other URLs - screenshot, thumbnail etc.

o-fl0w avatar Sep 08 '22 18:09 o-fl0w

This issue is closed but scope could be expanded to URLs provided by Stash in general. Screenshot URL for instance is also missing required apikey.

o-fl0w avatar Oct 10 '22 15:10 o-fl0w