Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Begin implementing a reporting mechanism#1496

Merged
dannycoates merged 2 commits intomozilla:masterfrom
dannycoates:dear-nice-things-too
Jul 24, 2020
Merged

Begin implementing a reporting mechanism#1496
dannycoates merged 2 commits intomozilla:masterfrom
dannycoates:dear-nice-things-too

Conversation

@dannycoates
Copy link
Copy Markdown
Contributor

No description provided.

@dannycoates dannycoates requested a review from flodolo as a code owner July 24, 2020 15:20
*[other] Report these files as suspicious
}
reportDescription = Help us understand what’s going on. What do you think is wrong with these files?
reportUnknownDescription = Please go to the url of the link you wish to report and click “{ reportFile }”.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should display the plural form, since it's the default. Can you confirm that works?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it does

Comment thread public/locales/en-US/send.ftl Outdated
@dannycoates dannycoates force-pushed the dear-nice-things-too branch from 7b3e815 to 9891d1f Compare July 24, 2020 15:33
@dannycoates
Copy link
Copy Markdown
Contributor Author

Thanks @flodolo

Comment thread app/controller.js
render();
} catch (err) {
console.error(err);
if (err.message === '404') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually happen every time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No,

/api/report returns

  • 200 - when the link was already flagged or was successfully flagged. Note that the file may already be "dead"
  • 400 - when the submitted key can't decrypt the metadata. This is to prevent reporting ids without knowing the full url
  • 404 - when the id has fully expired and deleted from redis. An api delete just marks the id as dead now so that we can accept reports for files that have already hit max download count

If it's a 404 we don't want to say there was an error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants