-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Recaptcha V2 support #1721
Comments
Hmm... If we have to add this ReCaptcha thing, I woud love to see it disabled by default and have alternatives available. |
I agree, it should be disabled by default. It requires a site key and a private key that you get from Google anyways, so essentially, we'd need a place to put the keys in the admin configuration, and then when a user attempts to register, if it's enabled, we need to load the JS file Google provides to load the recaptcha widget, and then on the registration side, the server needs to make a check with Google to see if it passes. I've never worked with node.js, but here's a package that makes it easy: https://www.npmjs.com/package/recaptcha2 I've implemented Recaptcha V2 many times using PHP and jQuery. It's really easy to do, so it should be relatively painless to add and support in PeerTube for someone that is decent with node.js |
@own3mall I know spam is a problem but, we may don't have to use google. We must at least have to look at https://www.w3.org/WAI/GL/wiki/Captcha_Alternatives_and_thoughts or any link like that. |
@Jorropo And reCAPTCHA doesn't have functional accessibility options if Google doesn't like your setup. Clicking on their audio challenge has instantly locked me out every single time I've tried, forcing me to do their visual puzzle until it decides to let me through (with anywhere from 1 to 3+ attempts that like to fail regardless of me clicking on everything it says to click on). Also, the audio challenge isn't accessible to some people either. |
It's not really a dependency. If you have it enabled, PeerTube uses it. If Google quits offering that service, you disable the plugin in your options. No more dependency. If someone would like to create a Recaptcha service that is better than Google's, feel free. But, it's not easy, so I'd rather just have the option of enabling / disabling Google's Recaptcha. It's not a very hard change to do either... I might do it myself just to get familiar with node.js... Yes, Google is evil (and alternatives are needed), but unfortunately, some of their products are pretty darn good. |
node.js is complicated, but I'm trying to get this to work: own3mall@2086bc4 Asked Choco via email if he can help me out... definitely want to get this to work if possible, and I'd love to learn more about node.js in the process 👍 - not a fan of it so far, but I can see why some would like it... |
This is exactly what I'm talking about, yes its for an optional function but its still a dependency, if google shutdown recaptcha we are fucked for this part of peertube. And we can't just say desactivate captcha, because optional function are maybe optional for you but that doesn't mean they are optional for everyone. I'll really love to see this functionality but not with google. Also peertube is made by angular, this is a single big page, so you can't include google's code only where you want it, it will be in every pages also when you don't use this option because the code is static. So please if you do that, at least put a message on your instance to warn other people about google intrusion (and load google's code after this message), (that doesn't mean they can't view your video, they can do it but from a free instance). |
Recaptcha would only be used during user signup. After that, it doesn't get used, and no, there is no Google code whatsoever that runs on your site. They do everything in an iframe and load their own JS that stays on their server. I'm sorry, but you have no clue what you're talking about, and you clearly don't understand how their Recaptcha system works. If Google were to break Recaptcha or change it, it could totally be disabled (in PeerTube's admin options... at least, that's how I'm trying to get it to work), and then that "dependency" (if you can even call it that) would be gone. No breaking functionality whatsoever. The RecaptchaV2 npm package would only be used if the option is enabled, and all this package does is make a connection to Google's API to get a response that was generated in their initial iframe (where you told Recaptcha to appear - also done using a setting). I think it would be a nice addition as a toggle-able option that is disabled by default. I think it's only needed in the user signup functionality for now, but it could always be expanded to be a required input when uploading videos. But for now, that's overkill... just need it for user signup. YouTube would have greatly benefited if they had used their own recaptcha system to prevent bots from uploading the same stupid videos over and over again... |
When they "do everything in an iframe and load their own JS" it doesn't stay on their server. It has to be downloaded like any other resource on the internet. This isn't a good solution. Especially for a software that was made because Google can't run a video sharing site properly. |
You're correct. The end user's browser client downloads the JavaScript, but ultimately, your server is not running any Google code. Google messed up YouTube, but they can make a good Recaptcha system though. For now, until they mess that up too, but while it's working, I find it quite useful at preventing spam. |
Personally I will never trust google again, to act as big brother is unlawful. |
@own3mall yes this is usefull, but some free/open alternative exists. |
I hate Google and never want any service powered by Google opt-in as default. I consider it dangerous. (And if you're protecting your privacy, ReCaptcha will not work properly and sometimes it takes more than 5 minutes to solve their puzzles (because they extensively use personnal informations to know if you're an human)) As I said and as Chocobozzz suggested it when he selected labels for this thread, ReCaptcha should be an option through add-on and not a default feature and should definetely be proposed among alternatives. So. For now, I would suggest to wait until the plugin system is available. |
More precise extrait :
You are saying you want to implement somethings that works most of the time and add an "addiction" (dependence en français) (I'm forced to use other words because its seems like there is some understanding) to google.
If we use recaptcha and then recaptcha gain a price or is gone we will lose captcha, and even if you can run without somethings that works most of the time isn't enough qualitative for peertube. |
Because your scenarios are unlikely to happen. I've been using Recaptcha V2 since it came out, and that was years ago. Solved my forum spam issues, and it works for pretty much everything in terms of fixing that problem. |
@own3mall everyone was think maps will be free for eternity but that wasn't the case.
Yes I totaly agrea with this BUT that not the unique things to do that, and recaptcha is google, and peertube is an alternative to youtube wich is google. |
you don't need google to protect your website, behind the curtain it's quietly the opposite since they can get ip address, cookies and much more from your website visitors and as someone said above it feeds their A.I more and more, analyzing every behavior, click etc... but Unfortunately this is not a trick unique to recaptcha, plenty of other well know social medias are on it. |
Those captchas aren't good enough. I've been using my own custom ones as well over the years... see here at the bottom of the login form (as an example): Those are not good enough for the AI systems of today. They can easily beat those captchas. Also, I'm pretty sure that cross origin CORS policies prevent cookies from being shared. All Google can do is set their own cookie (assuming 3rd party cookies are not blocked in the browser), and do their own tracking that way, but actually pulling information from your app... it's not possible... other than possibly obtaining the origin (the domain and page) which isn't a big deal. |
I've got it working in my branch https://github.com/own3mall/PeerTube. There's just a few more tweaks that I want to make. Here's some screenshots (click to enlarge): Admin Configuration Page: User Signup Page: |
Fine, but please don't merge it to upstream for the sake of keeping the project completely self-contained and FOSS |
OMG This is a BIG NO. Please guys, be sane when you suggest features. Including anything that will talk to Google is a mistake. I am fine with having a recaptcha plugin but I would not want it to be turned on by default. That would be an abomination. Instead I suggest we use a FLOSS alternative to Google's reCaptcha as it will further strengthen our freesoftware ecosystem because more people will start using that recaptcha and that would mean that as Peertube is adopted by mainstream society more and more people will contribute to the freesoftware recaptcha. This would further benefit every other free software which relies on it to stop spam. I think we should have the freesoftware alternative of recaptcha as default spam filter, anyone else not happy with it can install alternative recaptchas (google, yahoo, whatever) I hope the maintainers of Peertube make sane decisions in this regard. Peertube is freesoftware and let's keep it that way ^^ |
This comment has been minimized.
This comment has been minimized.
Google Recaptcha V2 is in a stable and completed state in my branch (https://github.com/own3mall/PeerTube), and it's turned off by default. Maybe it will help someone else that wants this feature in the future. At least I get to use it myself! 👍 |
Having that poprietary feature there is already tempting, even when disabled by default. Please keep it FOSS |
Actually, it should be discouraged to even run a peertube instance in that way |
Framasoft, the sponsor behind the project aims to promote FOSS alternatives. They asked people to help them de-google-ify internet. I think we've here a good case where we need to promote an alternative to ReCaptcha. |
Aside from the obvious privacy implications there’s also the moral trajectory here of all of your potential users being used to improve Google service (and therefore let them turn a profit) in the end (that’s what they’re using reCAPTCHA for). This discussion on HN yesterday erupted after changes to reCAPTCHA became apparent (Google uniquely fingerprinting users with the help of reCAPTCHA), maybe its comments can provide a viable alternative? https://news.ycombinator.com/item?id=20058697 The title of this issue should probably rather be “Implement user verification to deter bots”, with reCAPTCHA just being one solution among many :) |
I have a different idea to solve this problem. Instead of letting a computer decide if a user is legit, why don't we ask actual humans? Basically, it would work like this: when a new user signs up, they get asked a random question, like "why did you pick this instance", " what kind of videos are you going to upload", or "what topics are you interested in". They should answer this question in 3-5 sentences. Afterwards, Peertube picks some random, active users on the instance to review the text. The " reviewers are voluntary, and they can just ignore this if they don't want to do it. If the majority thinks the user is real, they can sign up. I think this would work really well, as long as the local users ("reviewers") understand that it is in their own interest to keep the instance spam free. |
@Nutomic I like the idea. Mastodon introduced something similar with 2.8.0 they call „admissions“, where you get put in a queue of potential sign-ups with a few questions asked in the process. Ultimately the moderation team either approves or denies all admissions. That shouldn’t deter PeerTube to go for a more crowdsourced admission process though :) Another potential mechanism for discouraging bot behavior or spam would be cooldown periods between posting videos for new(er) users or filesize vs media length checks (whereas if the movie is 2 hours long but basically just a black backdrop with a single written sentence and 30MB large it’s an obvious scam/bot). But that might be a topic for another feature request. |
Here is a very good article on Recaptcha and possible alternatives, I really recommend that you read it: |
@Nutomic Still doesn't change my opinion on the matter... those other captchas don't work... I've tried them before and even used my own. Good spam bots are quite capable of breaking through due to decent image recognition. I don't think you've run into a situation where spammers are trying to get through, but I've seen it on many forum platforms I run. |
You have to find a solution against some BOTS who post lot of content protected vids by API or webhook. Thank you. |
With the upcoming 2.1 release, the plugin API will provide hooks that allow captcha plugins to be developed. In fact, the plugin API makes them trivial to develop, and I already put together a recaptcha plugin (and others which will integrate less evil captcha services). |
Great work! Are there instructions for installing your plugin? Your plugin will work with the 2.1 release? It's not out yet, right? |
Installing a plugin, from an admin's perspective, can be most easily done via the web admin interface. Setting up the plugin afterwards usually comes down to following the instructions in the "Settings" of the plugin's web interface, or following the eponym section in the README if something more involved is required, which isn't the case of that plugin anyway. Just get your recaptcha API keys and give them to the plugin after its installation, using the web interface. The 2.1 release will add a parameter to the registration filter which is required by recaptcha, so yes the recaptcha plugin I wrote won't work with previous versions. Release 2.1 is yet to be drafted and neither I nor @Chocobozzz have an ETA atm. |
@rigelk Your plugin works great with PeerTube v2.1.0 Tested it this morning after upgrading. Thanks so much! |
@Chocobozzz The Recaptcha plugin by @rigelk no longer appears to work as of PeerTube 4.3.0. A captcha is no longer displayed during the registration process in my instance of PeerTube 4.3.0. Was something changed that would have broken this plugin? Right now, registration will fail for all new users on my instance. |
Would it be possible to integrate Google's Recaptcha V2 (not a robot) in PeerTube if account registrations are enabled? This would prevent bots from signing up.
As much as I hate to say it (since I hate Google), I've never seen a better working recaptcha in terms of blocking bots.
I think it would be awesome if their recaptcha would show up during using signup.
The text was updated successfully, but these errors were encountered: