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

Manage User Access Bug #11680

Closed
jquattlebaum opened this issue May 9, 2017 · 2 comments · Fixed by #11689
Closed

Manage User Access Bug #11680

jquattlebaum opened this issue May 9, 2017 · 2 comments · Fixed by #11689
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@jquattlebaum
Copy link

I am having an issue setting access permission with version 3.0.3. Whenever I click to grant view permissions to a user, who is not the anonymous or stats user, nothing happens. I checked the console to see if an error was being thrown and the following is what is displayed. Thank you for any help.

TypeError: value.replace is not a function
at Object.htmlEntities (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:934)
at ManageUserAccessController.setAccess (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:3324)
at fn (eval at compile (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:337), :4:325)
at b (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:235)
at e (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:378)
at b.$eval (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:254)
at b.$apply (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:254)
at HTMLImageElement. (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:378)
at HTMLImageElement.dispatch (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:5)
at HTMLImageElement.r.handle (index.php?module=Proxy&action=getCoreJs&cb=a62b7d8…:5)

@tsteur
Copy link
Member

tsteur commented May 9, 2017

Thank you @jquattlebaum .

FYI: We could prevent this error with String(login) in manage-user-access.controller.js but then it would likely still not work in your case as it seems to receive a wrong value.

Which PHP version are you using? By any chance, do you know if a setting disable_checks_usernames_attributes is enabled in your config/config.ini.php file?

Is it maybe possible to access your Piwik instance to debug the issue? A user with view access would be enough. If so, can you email us at hello at piwik.org?

I'm thinking it may be an encoding issue either with DB or something.

@jquattlebaum
Copy link
Author

Thanks for getting back to me.
We are on php 7 using ubuntu 16.04.
disable_checks_usernames_attributes is set to 0.

tsteur added a commit that referenced this issue May 11, 2017
… numbers

Eg when login is 1234, the `login` var may actually be a number and then `.replace` won't work.

fixes #11680
@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label May 11, 2017
@tsteur tsteur added this to the 3.0.4 milestone May 11, 2017
mattab pushed a commit that referenced this issue May 12, 2017
…ric (#11689)

* Fix giving a user access to a site is not possible when login is only numbers

Eg when login is 1234, the `login` var may actually be a number and then `.replace` won't work.

fixes #11680

* typo
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants