mitodl / ocw-studio

Open Source Courseware authoring tool
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Fix CodeQL Alert for SSRF #2197

Closed umar8hassan closed 1 month ago

umar8hassan commented 1 month ago

What are the relevant tickets?

closes #2175 and closes https://github.com/mitodl/ocw-studio/issues/2172

Description (What does it do?)

Limited the use of input url. Format for the subscribe url is pre-defined and only token will be used from the message.

How can this be tested?

The scope of this ticket is to test that url was formatted correctly after using the pre-defined url format

pt2302 commented 1 month ago

Could you add a test for this functionality, i.e., making sure that the URL is properly formatted? Also, we are not currently performing validation on some of these fields, such as AWS_ACCOUNT_ID. We should do this, and throw appropriate errors if they are not valid.