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

NPE caused by uppercase characters in repository names #481

Closed
gitblit opened this issue Aug 12, 2015 · 4 comments
Closed

NPE caused by uppercase characters in repository names #481

gitblit opened this issue Aug 12, 2015 · 4 comments

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 185

What steps will reproduce the problem?
With the server running on a UNIX-like system:
1. Open https://localhost:8443 with your web browser
2. Log in as 'admin' (or any user that can create repositories)
3. Click on 'new repository'
4. Create a repository with a name containing uppercase characters e.g.
    * name: TestRepo4
    * description:  Just a test
5. 'show a "readme" Markdown file on the summary page' was checked (don't think this
is important but anyway...)


What is the expected output? 
The user should be redirected to the repositories page and the new repository entry
should be visible.

What do you see instead?
The user is redirected to the internal error page.

What version of the product are you using? On what operating system?
Operating system: Ubuntu 12.04
Java version: 1.6.0_24 (OpenJDK)
Version: Gitblit v1.2.1-SNAPSHOT
Built with: ant buildGO
After building was done I copied the deploy/ directory to ~/temp and started the server
with: java -jar gitblit.jar

Please provide any additional information below.
Possible cause and fix: On UNIX systems path names are case sensitive. Gitblit stores
the repository's name converted in lowercase for internal operations but on the filesystem
the user supplied name is used (not thoroughly investigated but converting the repository
model's name to lowercase before saving the model in "EditRepositoryPage.java" method
"onSubmit()" seems to work).

You can find the server's output attached as 'err.txt'

Reported by cyberpython on 2013-01-05 21:25:36


- _Attachment: [err.txt](https://storage.googleapis.com/google-code-attachments/gitblit/issue-185/comment-0/err.txt)_
@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Oops.  I thought I had that fixed.  Fix pushed.

You are correct, Gitblit maintains it's internal cache based on lowercase names.  It
does support mixed case repo names but it enforces case-insensitive repo name uniqueness
regardless of the underlying filesystem.  Translation: you can't have TestRepo4 and
TestREPO4, even if your filesystem supports this.


Reported by James.Moger on 2013-01-05 22:24:55

  • Status changed: Accepted
  • Labels added: Milestone-1.2.1

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2013-01-05 22:25:09

  • Status changed: Queued

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Fixes deployed in 1.2.1

Reported by James.Moger on 2013-01-16 04:25:08

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2013-01-16 04:25:29

  • Status changed: Fixed

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix modified the milestone: 1.2.1 Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants