josmas / openwonderland

Automatically exported from code.google.com/p/openwonderland
GNU General Public License v2.0
3 stars 5 forks source link

Spaces in usernames break group util queries #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a user from the wonderland login page with a space in the name. i.e. 
Jag Wire
2. Set user to be a member of the admin group
3. Install admin-tools module
4. Login to wonderland using client
5. Try to right click on your avatar to "turn invisible"

What is the expected output? What do you see instead?
It is expected to see a "turn invisible" menu item, but none appears. This is 
just one specific example, however. Other modules that use the GroupUtils 
mechanics from the security-groups module will yield this behavior. In the 
darkstar server logs, one should see the following stack trace with the user 
name you picked substituted in:

[java] WARNING: Error reading groups for Ms Gloria from http://AA.BB.CC.DD:8080
[java] java.io.IOException: Server returned HTTP response code: 505 for URL: 
http://AA.BB.CC.DD:8080/security-groups/security-groups/resources/groups?members
=false&user=Jag Wire
[java] at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.jav
a:1441)
[java] at 
org.jdesktop.wonderland.modules.securitygroups.common.GroupUtils.getGroups(Group
Utils.java:90)
[java] at 
org.jdesktop.wonderland.modules.securitygroups.common.GroupUtils.getGroupsForUse
r(GroupUtils.java:77)
[java] at 
org.jdesktop.wonderland.modules.securitygroups.server.WebServiceUserPrincipalRes
olver.getRemotePrincipals(WebServiceUserPrincipalResolver.java:116)
[java] at 
org.jdesktop.wonderland.modules.securitygroups.server.WebServiceUserPrincipalRes
olver.getPrincipals(WebServiceUserPrincipalResolver.java:96)
[java] at 
org.jdesktop.wonderland.modules.security.server.service.UserPrincipals.getUserPr
incipals(UserPrincipals.java:51)
[java] at 
org.jdesktop.wonderland.modules.security.server.service.CellResourceService$Cell
TreeResourceImpl.request(CellResourceService.java:559)
[java] at 
org.jdesktop.wonderland.server.cell.ViewCellCacheMO$CellIDResource.request(ViewC
ellCacheMO.java:290)
[java] at 
org.jdesktop.wonderland.modules.security.server.service.SecurityService$Schedule
dRequest.run(SecurityService.java:303)
[java] at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[java] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[java] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[java] at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
86)
[java] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[java] at java.lang.Thread.run(Thread.java:662

Original issue reported on code.google.com by pympno...@gmail.com on 25 May 2011 at 9:30

GoogleCodeExporter commented 9 years ago
Maybe just URL encoding the user name will fix this. Try attached patch.

Original comment by jonathan...@gmail.com on 25 May 2011 at 10:12

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r4688.

Original comment by jonathan...@gmail.com on 26 May 2011 at 12:05