Skip to content
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

remoteuser - Patch for default setting and improved checking in hasAccess() #774

Merged
merged 2 commits into from Mar 12, 2016

Conversation

MartijnRas
Copy link
Contributor

I noticed a strange default setting of remoteuser.

I also noticed hasAccess() did not check this default setting.

Furthermore I think the following code in hasAccess() should at least return false, even better would be to remove it completely, as this feels like circumventing all security mechanisms:

    if(trim($conf['remoteuser']) == '') {
        return true;
    }

@splitbrain
Copy link
Collaborator

That's the point. Setting it to empty will allow any user to access the remote API. Actions within the API are still subject to the ACLs of course.
Your patch is fine anyway.

@splitbrain
Copy link
Collaborator

Oh, I see it breaks a bunch of tests. Not fine then ;-) Can you check what's going on there?

@splitbrain
Copy link
Collaborator

@MartijnRas can you please check the failing test cases?

@scrutinizer-notifier
Copy link

The inspection completed: No new issues

@MartijnRas
Copy link
Contributor Author

@splitbrain can you please review the updated test as i might have missed some of the intricacies of how the combinations of settings (remote, remoteuser, acl) are supposed to work?

@splitbrain
Copy link
Collaborator

@dom-mel could you have a look at this?

@Klap-in
Copy link
Collaborator

Klap-in commented Jul 31, 2015

Is this security related and useful for coming release? or is it fine, but just an improvement?

@@ -175,6 +175,9 @@ public function hasAccess() {
if (!$conf['remote']) {
return false;
}
if(trim($conf['remoteuser']) == '!!not set!!') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a dependency here that at least warrants a comment.

@dom-mel
Copy link
Collaborator

dom-mel commented Jan 31, 2016

looks good to me so 👍

splitbrain added a commit that referenced this pull request Mar 12, 2016
remoteuser - Patch for default setting and improved checking in hasAccess()
@splitbrain splitbrain merged commit 54c0fa7 into dokuwiki:master Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants