3

The troubled email is [email protected], the URL is https://junior.skyeng.ru/online-uroki-po-matematike/ (form is placed almost at footer).

The website to test is in Russian. If you want to help me - please translate it in Chrome, it's easy. Or you just go directly to Postman:

POST https://crm.skyeng.ru/order/createV2Kid
Body(x-www-form-urlencoded):
parentName: test
parentEmail: [email protected]
parentPhone: +79650389823 (any decent Russian mobile phone)
subject: mathematics
childName: test

So the response is 500 Internal Server Error. The task here is to localize the error. To find out the specific conditions why the bug occurs.

What I've done (just some of examples):

[email protected]
x-www-form-urlencoded
200 ok

[email protected]
x-www-form-urlencoded
500

[email protected]
x-www-form-urlencoded
200

[email protected]
x-www-form-urlencoded
500

And if you change from x-www-form-urlencoded to form-data it will return every request with 200 OK, even with our email [email protected].

So my questions are:

  • Is it really happening because of x-www-form-urlencoded? If so, why then we are able to get 200 Ok with [email protected] and any other real email?
  • Maybe we should look at some Headers or other additional information and if yes - where exactly?

I can't even google anything because I don't know exactly what to find. I googled articles about form-data/x-www-form-urlencoded, HTTP (https://developer.mozilla.org/en-US/docs/Web/HTTP) and still can't localize the bug.

I would appreciate any help!

9
  • Do you have access to server logs?
    – dzieciou
    Dec 24, 2019 at 6:47
  • 2
    @dzieciou Hi. No I don't have an access to server logs. I applied for a job and they gave me this test-assignment: "All you know that it is impossible to send a form with email teststudent12@skyeng.ru. Why? You need to localize the bug, workaround".
    – Andy
    Dec 24, 2019 at 6:56
  • Probably when you send urlenconded properties which are longer than some given size the issue appears? for example [email protected] is okay but [email protected] is not okay
    – wec
    Dec 24, 2019 at 11:18
  • 2
    Isn't that cheating if we are solving the problem that has to confirm your skills for the job? How is that different from doing the assigment at the university for some one else?
    – dzieciou
    Dec 24, 2019 at 11:48
  • 1
    I'm not asking you to give me the explicit answer which I copy-paste to the employer. I'm just asking for help where to dig. How else should I learn? Imagine that you work for the company for a year, then they gave you the task and you have no clue how to do it. Your actions? Should you retire or jump from the bridge or what? No, you have ask the community for help. And it is not cheating. The task says "to determine specific conditions why the bug occurs".
    – Andy
    Dec 24, 2019 at 11:57

3 Answers 3

2

Your testing is good. You are considering different possibilities and conducting experiments to see what happens. That is great.

I would continue that process. Here are some thoughts for you to try out. They are not answers you can copy and paste (which, as you indicate is good), they are ideas for your to try out yourself. Good luck!

  • Try special characters, numbers and letters, underscores 'as is'
  • Try special character that are encoded, e.g. &nbsp for space
  • Try different input lengths
  • Use an email that was created today
  • Use an email that you know doesn't exist
  • Use an accepted email then try a second time with same email and record error
  • Timing - try quick and slow data entry
  • Javascript - try disabling javascript
  • Browser errors - see chrome console for any errors, such as network

In some of the above cases, the details of the error may help point you towards the cause

1
  • +1 for mentioning the importance of the process itself. I think in such exercises during the hiring process, that might be even more important than the actual answer.
    – pavelsaman
    Dec 24, 2019 at 12:47
1

-

Is it really happening because of x-www-form-urlencoded? If so, why then we are able to get 200 Ok with [email protected] and any other real email?

it seems that it's a bug with the way the url encoded data is being decoded in your test product. For example consider the below comment https://github.com/angular/angular/issues/18261#issuecomment-331050300

Here , + sign in url encoded values are being replaced .

I think something similar is happening in test product where numbers are not decoded as expected.

The server should handle both content type the same way.

https://dev.to/getd/x-www-form-urlencoded-or-form-data-explained-in-2-mins-5hk6

Maybe we should look at some Headers or other additional information and if yes - where exactly?

About headers and content type , you should ask for the API contract . Which is just a documentation stating what all headers, what body, what methods a API endpoint supports and what response it gives for different scenarios.

Usually a swagger page is setup for this purpose instead of paper documentation

I can't even google anything because I don't know exactly what to find. I googled articles about form-data/x-www-form-urlencoded, HTTP (https://developer.mozilla.org/en-US/docs/Web/HTTP) and still can't localize the bug.

Try different boundary value, and partition scenarios like character length , numbers , special characters , different encodings , etc

Eg: try giving exact char plus a digit , if error comes then just give digit . Then we can confirm that the error is due to the wrong decoding of number by the system

1
  • 1
    Please provide a comment when downvoting so that others knows why this is wrong or correct the person who down voted it
    – PDHide
    Dec 24, 2019 at 17:16
0

It might be variety of things.

Return message only shows in payload internal server error so you need to check internally, on the server what happened. 80% of this type of bugs is something in DB (bad constraints on the tables).

Then only way to know for sure is to see what backend is doing and without code or access to proper logs it's impossible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.