latos / wave-protocol

Automatically exported from code.google.com/p/wave-protocol
0 stars 0 forks source link

id.GetDomain returns all toLower, while (domain) does not. #199

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In server.config, use a capital letter anywhere for the wave_server_domain 
(line 5)
2. Run ./run-server.sh
3. Register a new user

What is the expected output? What do you see instead?
Expected output is new user is registered.
Error returns stating that "You can only create users at the " + domain(from 
server.config?) + " domain"

What changeset or version are you using? On what operating system?
0.3 (trunk as of the time of this writing).
Ubuntu w/ Gnome

Release 10.10(maverick_
Kernel Linux 2.6.35-22-server
GNOME 2.32.0
Firefox Web Browser

Please provide any additional information below.

It appears that on line 112 of 
org.waveprotocol.box.server.rpc.UserRegistrationServlet.java, the check 
converts one variable toLower, but not the other.
112: if(!id.getDomain().equals(domain))
id.getDomain is all lower case, even when the domain is added automatically. 
the (domain) variable seems to come from the server.config, and may contain 
capital letters. if it does, registration will fail.

I don't know if this is intentional or not. After changing code to confirm my 
findings, instead of changing code, I just went all lower case in my 
server.config file. Please don't hesitate to ask if you have further questions.

Original issue reported on code.google.com by JordanRead on 11 Jan 2011 at 12:21

GoogleCodeExporter commented 8 years ago
Looks like this can be fixed by lowercasing the domain where it's injected into 
the servlet constructor. Anyone want to make and test a patch?

Original comment by ano...@google.com on 11 Jan 2011 at 4:36

GoogleCodeExporter commented 8 years ago
Unfortunately, I don't have the environment setup to create and submit patches. 
Any resources on how to do that? I'm new to actually contributing, although I 
do know my logic :D. 

Original comment by JordanRead on 11 Jan 2011 at 6:19

GoogleCodeExporter commented 8 years ago
I'll make a patch.

Original comment by ano...@google.com on 12 Jan 2011 at 12:23

GoogleCodeExporter commented 8 years ago
Code looks good. Once I get the hang of this thing I'll download it and check.

Original comment by JordanRead on 12 Jan 2011 at 12:36

GoogleCodeExporter commented 8 years ago

Original comment by ano...@google.com on 13 Jan 2011 at 2:29