rust-lang / crates.io

The Rust package registry
https://crates.io
Apache License 2.0
2.98k stars 601 forks source link

Report a Crate isn't working #9949

Open blueglyph opened 3 hours ago

blueglyph commented 3 hours ago

Current Behavior

Clicking on the Report crate button opens the form as expected, with the name of the crate, the reason, and optional details. But when I click on the Report button at the bottom,

Expected Behavior

The report is sent and a confirmation is shown; for example with a pop-up or by displaying a new confirmation page.

Steps To Reproduce

Environment

Anything else?

I didn't see any specific instruction or requirement, e.g. to be either logged in or not. I tried both, but it didn't seem to make any difference. I disabled my uBlock plugin, but it didn't make any difference, either.

Perhaps it's simply not giving any feedback and the report is sent anyway, and perhaps Firefox opening a new browser is a side-effect? Hard to know. Or perhaps it's only a placeholder for the functionality to come?

There's very little explanation about it, so I assumed it was a regular report feature.

Turbo87 commented 2 hours ago

The "Report" button on that page essentially generates a mailto: link and is supposed to open that link in a new tab. Not sure what happened in your case.

@eth3lbert any ideas?

blueglyph commented 1 hour ago

Oh. I would have never expected that; I haven't used an email client for about 20 years. But I remember those mailto-generated forms, now.

I assume you don't want to use a database to store the reports. Using emails is fine, but requiring users to have an email client is a little awkward, since a lot of them don't have any, these days. Is there an alternative way to send an email with the report?

Turbo87 commented 1 hour ago

I assume you don't want to use a database to store the reports.

we need a way to respond to reports, so email seems more suited

requiring users to have an email client is a little awkward, since a lot of them don't have any, these days

yeah, that is a fair point. Firefox is able to use in-browser Gmail with mailto: links, but it seems that they don't support any other providers.

Is there an alternative way to send an email with the report?

you can send a regular email to help@crates.io

eth3lbert commented 1 hour ago

Here is the template we used:

To: help@crates.io
Subject: The `crate name` crate

Content:
I'm reporting the `link to the crate on crates.io` crate because:

- [ ] it contains spam
- [x] it is name-squatting (reserving a crate name without content)
- [ ] it is abusive or otherwise harmful
- [ ] it contains a vulnerability (please try to contact the crate author first)
- [ ] it is violating the usage policy in some other way (please specify below)

Additional details:
eth3lbert commented 1 hour ago

The "Report" button on that page essentially generates a mailto: link and is supposed to open that link in a new tab. Not sure what happened in your case.

@eth3lbert any ideas?

All reported issues about the support page (crate report) are currently related to email clients or URL scheme handlers. I assume that most users should work fine with the current implementation. However, we could revisit this if we see a significant number of users experiencing issues.

blueglyph commented 34 minutes ago

All reported issues about the support page (crate report) are currently related to email clients or URL scheme handlers. I assume that most users should work fine with the current implementation. However, we could revisit this if we see a significant number of users experiencing issues.

By looking more around Firefox, I found that it was possible to configure how to handle mailto:, including a way to link it to Gmail. I'm not sure if it's possible with other providers like ProtonMail, but Gmail would be fine for most (about 33% users, another 50% coming from Apple Mail, apparently, and the rest being small percentages of various methods). After I configured it for Gmail, clicking on Report opens the Gmail login page.

However, I'm currently using Brave, which doesn't seem to have any handler configuration. I reported the problem there, but a few posts I found suggested that the Mail app should be configured as default app in Windows, so that's limited to clients (unless there's a trick I don't know).

In conclusion: it works with some browsers, but it's not standard. People who don't use a client must use a browser that allows for customizing the mailto: handler.

Since "mail-less" reports are the norm, I'd still suggest to make the user aware it's email-based to avoid any confusion. 🙂