Skip to main content
added 73 characters in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

I can't replicate the bug as originally stated,stated; both /questions/{ids} and /comments/{ids} give the same results which are:

  1. can_flag is false for my comments.   (Correct behaviorCorrect behavior)
  2. can_flag is true for comments posted by others.   (See next item)
  3. can_flag is true even for comments that I have an active flag on.   (Wrong behaviorWrong behavior)

##Steps to replicate:
  1. Go to this API OAuth page and authorize the application.

  2. From the resulting value in your browser's address bar, copy out the access_token value.
    For example, if your browser is redirected to:

    https://stackexchange.com/oauth/login_success#access_token=OGuIJlBxxxMkj2Ola1jG1A))&expires=86400
    

You want the OGuIJlBxxxMkj2Ola1jG1A))

  1. Find a question with a comment you can legitimately flag; perhaps the sandbox question on MetaSE.

  2. Add your own comment there.

  3. Flag a single comment that legitimately deserves it (if any).

  4. Visit this page in your browser (After updating the access_token):

    https://api.stackexchange.com/2.2/questions/3122/?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!pL7rWh2ni*lt.6(Pbf6bqCepl*I4sG)2VFlDiXzeex7895bjn0p3NcCGHCZb28uVIY
    

It helps if you use Firefox or a browser/extension that formats the JSON for you.

  1. Note that can_flag is false for your comment. (Correct)

  2. In the JSON, find the comment you previously flagged (hopefully the comment and flag both still exist). Copy its ID.

  3. Visit this page in your browser (After updating the comment ID and the access_token):

    https://api.stackexchange.com/2.2/comments/{INSERT VALUE FROM STEP 8 HERE}?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!1zSn*g7xPUqB4hiVTpmJB
    
  4. Note that the comment's can_flag still shows as true -- which is incorrect.

  5. Delete the comment you made in step 4, if appropriate.

  6. Your access_token will expire in 24 hours. Or you can deauthorize the app by following these instructions.





I'll probably edit the question in a bit to try and clear it up.

I can't replicate the bug as originally stated, both /questions/{ids} and /comments/{ids} give the same results which are:

  1. can_flag is false for my comments.   (Correct behavior)
  2. can_flag is true for comments posted by others.   (See next item)
  3. can_flag is true even for comments that I have an active flag on.   (Wrong behavior)

##Steps to replicate:
  1. Go to this API OAuth page and authorize the application.

  2. From the resulting value in your browser's address bar, copy out the access_token value.
    For example, if your browser is redirected to:

    https://stackexchange.com/oauth/login_success#access_token=OGuIJlBxxxMkj2Ola1jG1A))&expires=86400
    

You want the OGuIJlBxxxMkj2Ola1jG1A))

  1. Find a question with a comment you can legitimately flag; perhaps the sandbox question on MetaSE.

  2. Add your own comment there.

  3. Flag a single comment that legitimately deserves it (if any).

  4. Visit this page in your browser (After updating the access_token):

    https://api.stackexchange.com/2.2/questions/3122/?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!pL7rWh2ni*lt.6(Pbf6bqCepl*I4sG)2VFlDiXzeex7895bjn0p3NcCGHCZb28uVIY
    

It helps if you use Firefox or a browser/extension that formats the JSON for you.

  1. Note that can_flag is false for your comment. (Correct)

  2. In the JSON, find the comment you previously flagged (hopefully the comment and flag both still exist). Copy its ID.

  3. Visit this page in your browser (After updating the comment ID and the access_token):

    https://api.stackexchange.com/2.2/comments/{INSERT VALUE FROM STEP 8 HERE}?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!1zSn*g7xPUqB4hiVTpmJB
    
  4. Note that the comment's can_flag still shows as true -- which is incorrect.

  5. Delete the comment you made in step 4, if appropriate.

  6. Your access_token will expire in 24 hours. Or you can deauthorize the app by following these instructions.





I'll probably edit the question in a bit to try and clear it up.

I can't replicate the bug as stated; both /questions/{ids} and /comments/{ids} give the same results which are:

  1. can_flag is false for my comments.   (Correct behavior)
  2. can_flag is true for comments posted by others.   (See next item)
  3. can_flag is true even for comments that I have an active flag on.   (Wrong behavior)

##Steps to replicate:
  1. Go to this API OAuth page and authorize the application.

  2. From the resulting value in your browser's address bar, copy out the access_token value.
    For example, if your browser is redirected to:

    https://stackexchange.com/oauth/login_success#access_token=OGuIJlBxxxMkj2Ola1jG1A))&expires=86400
    

You want the OGuIJlBxxxMkj2Ola1jG1A))

  1. Find a question with a comment you can legitimately flag; perhaps the sandbox question on MetaSE.

  2. Add your own comment there.

  3. Flag a single comment that legitimately deserves it (if any).

  4. Visit this page in your browser (After updating the access_token):

    https://api.stackexchange.com/2.2/questions/3122/?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!pL7rWh2ni*lt.6(Pbf6bqCepl*I4sG)2VFlDiXzeex7895bjn0p3NcCGHCZb28uVIY
    

It helps if you use Firefox or a browser/extension that formats the JSON for you.

  1. Note that can_flag is false for your comment. (Correct)

  2. In the JSON, find the comment you previously flagged (hopefully the comment and flag both still exist). Copy its ID.

  3. Visit this page in your browser (After updating the comment ID and the access_token):

    https://api.stackexchange.com/2.2/comments/{INSERT VALUE FROM STEP 8 HERE}?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!1zSn*g7xPUqB4hiVTpmJB
    
  4. Note that the comment's can_flag still shows as true -- which is incorrect.

  5. Delete the comment you made in step 4, if appropriate.

  6. Your access_token will expire in 24 hours. Or you can deauthorize the app by following these instructions.

Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

I can't replicate the bug as originally stated, both /questions/{ids} and /comments/{ids} give the same results which are:

  1. can_flag is false for my comments.   (Correct behavior)
  2. can_flag is true for comments posted by others.   (See next item)
  3. can_flag is true even for comments that I have an active flag on.   (Wrong behavior)

##Steps to replicate:
  1. Go to this API OAuth page and authorize the application.

  2. From the resulting value in your browser's address bar, copy out the access_token value.
    For example, if your browser is redirected to:

    https://stackexchange.com/oauth/login_success#access_token=OGuIJlBxxxMkj2Ola1jG1A))&expires=86400
    

You want the OGuIJlBxxxMkj2Ola1jG1A))

  1. Find a question with a comment you can legitimately flag; perhaps the sandbox question on MetaSE.

  2. Add your own comment there.

  3. Flag a single comment that legitimately deserves it (if any).

  4. Visit this page in your browser (After updating the access_token):

    https://api.stackexchange.com/2.2/questions/3122/?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!pL7rWh2ni*lt.6(Pbf6bqCepl*I4sG)2VFlDiXzeex7895bjn0p3NcCGHCZb28uVIY
    

It helps if you use Firefox or a browser/extension that formats the JSON for you.

  1. Note that can_flag is false for your comment. (Correct)

  2. In the JSON, find the comment you previously flagged (hopefully the comment and flag both still exist). Copy its ID.

  3. Visit this page in your browser (After updating the comment ID and the access_token):

    https://api.stackexchange.com/2.2/comments/{INSERT VALUE FROM STEP 8 HERE}?access_token={INSERT VALUE FROM STEP 2 HERE}&site=meta&key=dp55hR5Wr9UhOJReA6F2gg((&filter=!1zSn*g7xPUqB4hiVTpmJB
    
  4. Note that the comment's can_flag still shows as true -- which is incorrect.

  5. Delete the comment you made in step 4, if appropriate.

  6. Your access_token will expire in 24 hours. Or you can deauthorize the app by following these instructions.





I'll probably edit the question in a bit to try and clear it up.