Closed (outdated)
Project:
CAPTCHA
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Reporter:
Created:
27 Jul 2008 at 22:15 UTC
Updated:
10 Jan 2017 at 12:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
soxofaan commentedThe form at admin/user/user/create apparently has the same form_id as the form at user/register . So there is not much that can be done to it, unless some very page specific hacks, which I'm not inclined to.
Apart from that: why can an untrusted user reach an admin page like admin/user/user/create in your setup?
If you trust the user (role), just add the skip CAPTCHA permission to that role.
If you don't trust the user, the CAPTCHA should be added anyway, so it's not a bug
Comment #2
salvisThis is not an untrusted user. But "trusted" and "does not want to see captchas anywhere" are two different things. I generally like to see the site as my users see it.
user/register only works for anonymous users and everything under admin only works for highly trusted users. Having to use a global permission (global in the sense that it applies to all forms) to get this to work properly seems like an awful waste of functionality, kind of like suggesting to disable Captcha if you don't want to see it on admin/user/user/create (slight exaggeration to make my point).
I'm surprised that you don't agree that this is broken, but if you don't want to fix it, then how about a checkbox that disables captchas (and CAPTCHA administration links) under the admin path. I bet that most admins would activate this.
Comment #3
soxofaan commentedThat's where the CAPTCHA administration links are for. Granted, these links are not a CAPTCHA like anonymous users would see them, but they show basic information about the CAPTCHA configuration of the form.
This could actually be a feature request: adding a real CAPTCHA example in addition to the CAPTCHA administration links, but I don't think this is the point you are trying to make in this issue?
I'm not sure I'm getting your point. But what's wrong with one global "skip CAPTCHA" permission? Are you suggesting that there should be more granularity so that you can enable/disable CAPTCHAs for each possible combination of roles and form_id's?
IMHO, a CAPTCHA is only about blocking bots: you trust a user not being a bot or you don't, the form_id or on what page the form is does not really matter, that's why I think there should only be only one "global" permission.
The only thing that may be considered broken IMHO is that a CAPTCHA is added to admin/user/user/create for untrusted users, while no CAPTCHA administration links will show up on that same form to administrators, so the admin is unaware that a CAPTCHA is added.
In practice however, this should never happen, as untrusted user should never be able to reach a form under admin/*, that's why I consider it a non-issue.
Moreover, If you do have a setup where untrusted users can reach a form under admin/*, CAPTCHA is not the right tool to fight misuse, as it can only block evil bots, not evil humans.
So indeed, it's maybe a good idea to (add an option to) disable all CAPTCHA stuff all together for forms under admin/*
On the other hand, there is this feature request #229710: Allow captchas on admin forms for adding CAPTCHAs to admin pages (in the context of demo sites) which is quite the opposite.
Overall, I'm not sure if I got your message right, so please be welcome to elaborate ;)
Comment #4
salvisNo, I don't want to see CAPTCHA administration links unless I temporarily enable them. I want to see the site as the user see it. Think of it as "eat your own dog food."
No, the global permission is fine. You suggested to use it for getting rid of the CAPTCHA on admin/user/user/create. IOW, if I want to fix admin/user/user/create I should set "skip CAPTCHA". Committing the permission to fixing admin/user/user/create means I can't use it anymore for what it was intended for. IOW, using the global permission is not a valid solution to the local problem on admin/user/user/create. Disabling ALL captchas is not the solution to getting rid of just one, because I'd like to continue seeing the others.
I think our communication problem is that for you "untrusted" and "see captchas" are equivalent:
untrusted => see captchas
see captchas => untrusted
For me it's more like:
untrusted => see captchas (i.e. the admin want them to see captchas)
trusted => does not need to see them but may want to see them anyway (in the places where the untrusted users see them, but not on admin where untrusted users usually can't go)
'user_register' is probably one of the form_ids for which many admins want to enable a CAPTCHA. Technically, the fact that
admin/user/user/create uses the same form_id is not a bug in CAPTCHA, of course, but the effect is that CAPTCHA doesn't work as intended, which in the end is indistinguishable from a bug. So, I think the CAPTCHA module should implement a work-around for the core quirk.
I thought of that and that's why I suggested to make it an option. However, demo sites with open access to admin pages are probably a small minority among the Drupal sites, and all the others would be well-served by enabling that option by default.
Have I been able to make myself clearer?
Comment #5
soxofaan commentedIn Drupal it is very common that the look and composition of pages and forms depend on the active user role. Take the node creation form for example. As mimimal permission user, you have a title and body field and that's about it. As root user, you have title, body, comment settings, URL path settings, menu settings, authoring settings, workflow stuff, etc.
Even if this would be implemented in CAPTCHA, you still would have to test your site as a "normal" user as all the other parts of Drupal do it differently as you want it. It's just not the traditional design pattern in Drupal.
Does this also include correctly solving the CAPTCHAs? Seems very annoying to me ;)
I just suggested that the user roles that have access admin/user/user/create should get the "skip CAPTCHA" permission. These users should be some sort of administrators or at least users you can trust not being spammers.
Not all user roles should get the "skip CAPTCHA" permission of course, that would make CAPTCHA useless.
If you're letting untrusted users access admin/user/user/create, I think there is a bug in your permission setup ;)
I agree with you on this.
But it all depends on how to present the CAPTCHA (information). Currently you have this feature as the CAPTCHA fieldset with CAPTCHA administration links for administrators.
You could also show a real CAPTCHA, but then admins might think they have to solve it (which would unleash bug reports as "hey, I have the skip CAPTCHA permission, but I still get CAPTCHAs").
I still don't see the bug. To me, CAPTCHA works as intended:
What's unintended in this?
I think the page or path of a form is not important. If it has the same form_id, it's coming from the same form builder, so it's providing the same functionality in essence, so the protection regarding untrusted users should be the same.
For example with form_id user_register, the only difference between the user/register version and the admin/user/user/create version is an active/blocked option and user role checkboxes, which is not really relevant in this discussion. Both versions should have the same CAPTCHA protection.
Overall, I think we're mixing two different things in this thread:
I hope I have made myself clearer too
but there still seem to be some foggy clouds left in the discussion ;)
Comment #6
soxofaan commentedAbout the CAPTCHA administration links,
what do you think of:
Comment #7
salvisYes, seeing more (in the sense of addtional features) is less of a problem as having a different user experience. On that very form, if you have "preview before post" enabled, this is for everyone. Not even user 1 is privileged. That's the approach that I like, and it's right there in core.
Yes, I would like to have that possibility. Again, think of "preview before post," which I have enabled on most of my sites. Annoying maybe, but the same for everyone. I occasionally meet my users face-to-face, and it must never ever happen that someone tells me "having to click [Preview] before [Save] is annoying" and I reply "gee, I never had that problem." Or that they tell me "those CAPTCHAs are very difficult to solve" and I have to say "hmm, I wouldn't know because I never see them."
No, no, no! Please let go of this idea! I know that it's a valid use case for demo sites and I'm not losing sight of that possibility, but this is not at all what I'm talking about. It only confuses the discussion if you keep bringing it up.
Ok, I'll accept that you recommend setting it up that way, but it would like this to be a choice. If it were set up that way, then the coincidence of the form_ids on two different paths wouldn't be a problem, but the module should work reasonably even if the admin chooses not to set that permission.
I agree with you. What I'm trying to say is that it should be possible to get the CAPTCHA only on user/register but not on admin/user/user/create without having to set the "skip CAPTCHA" permission.
I have bots that create dummy accounts every day, and when I set user_register to get a CAPTCHA then I'm trying to solve a concrete problem. I expect the CAPTCHA to appear on user/register, but not on admin/user/user/create.
I see seven form_ids in the Challenge type per form fieldset, and I assume you've selected those seven because they are the most commonly used ones. When you selected user_register, you surely had user/register in mind, not admin/user/user/create, right? So, the CAPTCHA showing up on admin/user/user/create is unintended, right? And I think it's undesired in most cases. It's not your fault, I know, but it's nonetheless unexpected and undesired behavior of the module.
I tend to agree, but the result of this principle is unsatisfactory in this case, IMHO. Now the question is what's the best way to fix it:
#4 would fix the problem with surgical precision and avoid having to use a global option for a special case issue, but I think #3 would be desirable in a much larger context, and if we have #3, then this is a non-issue, as far as I can see.
I think I already have that — I just don't enable 'skip CAPTCHA'. This works fine (except for user 1, but that's ok for me) — or am I missing something?
No, it's not about the admin links. I hope I've been able to explain myself now.
Yes, we're getting there. Thank you for your patience!
Re #6: (maybe we should have started a new thread for this, but you initiated it... :)
Does this mean there would be no way to get CAPTCHA administration fieldsets on admin/* forms? That would probably result in complaints from demo site administrators (who would probably want to put CAPTCHAs only on those admin/* forms that they expose).
That said, it's fine with me. Of course it will never show on user/register, because that page is only available to anonymous users (who presumably don't get the administer CAPTCHA permission). — user_register really is a special case...
Yes, I would welcome this (but see below). If the CAPTCHA administration fieldset is compressed, it would be nice if the fieldset title could show the CAPTCHA state, so you don't have to open it to check, for example "Active CAPTCHA" vs. "CAPTCHA (disabled)".
Currently, there seems to be no way to display the CAPTCHA fieldset (for untrusted users) and the CAPTCHA administration fieldset on the same page, is there? If a user has 'administer CAPTCHA' but not 'skip CAPTCHA', the non-admin pages behave as if the user didn't have 'administer CAPTCHA'. You're making the assumption, that whoever has 'administer CAPTCHA' will also have 'skip CAPTCHA' (i.e. "trusted" <=> "skip CAPTCHA"), but that's not necessarily true.
Thinking out loud:
I think I'm unhappy with 'skip CAPTCHA' because it's mis-named. It does not just allow skipping the CAPTCHAs, but it takes the CAPTCHAs away completely, i.e. it removes something, more like 'not see CAPTCHA' (for want of a better name). Maybe there ought to be two different permissions; 'skip CAPTCHA' should allow leaving the CAPTCHA entry field empty (but still check the input if something is entered), and only 'not see CAPTCHA' would hide it.
Or even better: keep 'skip CAPTCHA' as it is, but introduce a new option that defines whether 'skip CAPTCHA' hides the CAPTCHAs or not. This would even work for user 1 (who can't not enable 'not see CAPTCHA').
It simply makes me uneasy when users see something on my sites that I don't see...
Comment #8
soxofaan commented(sorry for delay)
aha! ok, now I understand your use case (finally). So you have an admin user role which you don't give the skip CAPTCHA permission to on purpose, so the admin sees the CAPTCHA's like normal users.
I didn't think of this usage, and it's probably not very common, but it makes sense in a way.
Your proposal #3 makes the most sense to me, because it solves you problem and solves the problem of the demo sites.
#1 is does not work for your use case, #2 seems to hackish and overkill, #4 is also too hackish.
The current flow for adding a CAPTCHA or CAPTCHA administration links is as follows:
What we are converging to is more like (in pseudo code)
So we now have an option to permit CAPTCHA's on admin forms or not (solves your problem and the demo sites problem)
and we also cover the use case of a admin role without skipCAPTCHA permission but with adminCAPTCHA permission: gets both the CAPTCHA and the CAPTCHA admin links (something you also noted)
I'm not sure about changing "skip CAPTCHA" to something else, that's maybe food for another issue.
Most of your concerns should be solved with the above anyway.
any thoughts?
Comment #9
salvisNot at all. Thank you for your extraordinary patience!
Yes, exactly. Sorry for not making myself clear before.
Your pseudo code looks good. It would be nice if both parts could go into the same (expanded) fieldset, if they're both shown.
Ok, I've opened #291982: Make 'skip CAPTCHA' do what it says to pursue this. It would turn your pseudo code into something like
Comment #10
soxofaan commentedfirst patch, be welcome to test it
patch involves
It has been a hairy road to produce this patch (and there is still a very minor bug left of which I'm aware).
I'm considering to move this feature request from DRUPAL-6--1 to HEAD (which is experimental atm, but has a cleaner design and should avoid the occasional spaghetti code)
Comment #11
soxofaan commentedbump
should be fixed before 6.x-2.0
Comment #12
soxofaan commentedworking on it at http://github.com/soxofaan/drupal-captcha-dev/tree/captcha_admin_mode
I further played with the idea and I'm working towards
Comment #13
soxofaan commentedbetter title
and marked #445026: Allow CAPTCHAs on Admin Pages as duplicate
Comment #14
elachlan commented