CSAllenISDClassroom / sudokuserver-acid-dragons-1

sudokuserver-acid-dragons-1 created by GitHub Classroom
1 stars 1 forks source link

Despite providing invalid "difficulty" in the resource of a POST request, board is still generated. #41

Closed OneNameMarty closed 3 years ago

OneNameMarty commented 3 years ago

When I send a POST command to the server with the difficulty resource being any string a valid ID and corresponding board is generated.

Here are two tests I did which both worked.

URL sent to server: "https://codermerlin.com/vapor/jean-martin-vaneskahian/games?difficulty=gobbledeguk"
Response: {"id":261741979532374360}

URL sent to server: "https://codermerlin.com/vapor/jean-martin-vaneskahian/games?difficulty=ASLDLJgJKADH^"
Response: {"id":6050968783111879780}

Additionally, when both of these requests went through the status was "200 ok" when as per W3911 it should have been "400 Bad Request (difficulty specified doesn't match requirements)"

Finally, when both of these returned IDs had a proper GET request on them they returned valid boards.

If you have any questions on how I obtained this result or require any further action on my end please email me at jean-martin.vaneskahian@student.allenisd.org

NatLark commented 3 years ago

I added random parameters with numerical values, and a valid ID was returned. These are the test values I utilized:

https://codermerlin.com/vapor/natalie-larksukthom/games?difficulty=129873 {"id":283229965377110701}

https://codermerlin.com/vapor/natalie-larksukthom/games?difficulty=901287 {"id":7654436519264115845}

agarmu commented 3 years ago

Possible duplicate of #35

Tariq-Mahamid commented 3 years ago

Fixed.