Damn-Vulnerable-GraphQL-Application icon indicating copy to clipboard operation
Damn-Vulnerable-GraphQL-Application copied to clipboard

[Feature request] python 3.10 supports

Open noraj opened this issue 2 years ago • 11 comments

I have seen:

  • #34
  • the readme saying Note: Python 3.10 is not supported yet!
  • the Dockerfile using python 3.7

Would be nice to have python 3.10 support for server install.

noraj avatar Nov 22 '22 13:11 noraj

I can give this a look. In the past, if I recall correctly, some of the dependencies that DVGA uses do not yet support 3.10 themselves. I will check whether there has been any progress.

dolevf avatar Nov 30 '22 16:11 dolevf

Yeah, so I looked into this and it appears the websockets/graphql subscription functionality is broken and not currently supported in 3.10. We will need to swap out flask-sockets library with something which is not a small lift. We may look into this in the future but at this point we will put this on ice.

dolevf avatar Dec 10 '22 17:12 dolevf

@noraj please see branch https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application/tree/dvga-py3-10 where we have DVGA running on Python 3.10, and if possible, please give it a test run to see everything is working as expected, in particular:

  • WebSockets
  • GraphQL Subscriptions

dolevf avatar Dec 16 '22 02:12 dolevf

Subscription request

With Python 3.10 from the dvga-py3-10

image

With Python 3.7 from the dockerhub image

image

So I don't have a working subscription request that I could test.

noraj avatar Dec 19 '22 21:12 noraj

you can use Altair Client, I believe GraphiQL doesn't support subscriptions

dolevf avatar Dec 20 '22 13:12 dolevf

you can use Altair Client, I believe GraphiQL doesn't support subscriptions

I tried it with Insomnia too, that claims to support websockets https://github.com/Kong/insomnia/discussions/4477, cf. https://insomnia.rest/changelog#2022.6.0 and https://docs.insomnia.rest/insomnia/websockets. So I asked if it supports GraphQL subscriptions.

Well then, I'll try again with Altair.

noraj avatar Dec 20 '22 14:12 noraj

I'm going to look into the errors that you're observing. Another way you can explore this is:

  1. Load the UI
  2. Go to Public Pastes
  3. Create a paste with the mutation createPaste
  4. Observe that the Public Paste page (step 2) updated the page immediately without a refresh

dolevf avatar Dec 20 '22 18:12 dolevf

https://user-images.githubusercontent.com/5857304/208740937-cf0c970f-edfe-495e-9b9e-acdaf94ea159.mp4

dolevf avatar Dec 20 '22 18:12 dolevf

Subscriptions seems to work well on my side.

noraj avatar Dec 29 '22 21:12 noraj

While we are at it we may update it to Python 3.11.

noraj avatar Dec 29 '22 21:12 noraj

hmm, that will require some additional work, I'll try to find some time.

dolevf avatar Jan 04 '23 23:01 dolevf