Project

General

Profile

Can anybody help me with HGRedmine

Added by Declan Lynch over 13 years ago

I've been looking into HGRedmine as a system to allow push access to HG Repositories based on a user Redmine permissions but I am having a rather hard time to get it running.

The original HGRedmine website si down and there is no installation docuemntas to be found anywhere.

Does anybody know if HGRedmine will work with Redmine 1.1.1 ( or trunk ) and how to get it up and running. I have most bits figured out, I have my virtual host serving the wsgi script, I have the system asking for authentication but it just goes into a loop asking for auth.

What I'd like is to have an anonymous user be able to hit the main HGWeb list of repositories and also for an anonymous user for me able to review a single repository but require authentication for pushing to the repository.


Replies (5)

RE: Can anybody help me with HGRedmine - Added by Declan Lynch over 13 years ago

Investigating this issue myself and it would appear that the addition of the individual salts to users passwords may be the cause. RedmineHG doesn't account for this.

If I get a working fix I'll publish it here.

RE: Can anybody help me with HGRedmine - Added by Declan Lynch over 13 years ago

So it is definitely the new password salt that is the issue with HGRedmine. I have resolved the some of the issues by looking up the user's salt and using it along with the users hashed password. While it's still not 100% working this is a start. here is the code that I added to the _user_login in the hgredmine.py

dbcur = db.cursor()
dbcur.execute('SELECT users.salt FROM users '
'WHERE users.login=%(ph)s'
% {'ph':self.placeholder},
(username)
)
row = dbcur.fetchone()
if not row:
return False
user_salt = row[0]
user_hashed_password = hashlib.sha1(password).hexdigest()
hashed_password = hashlib.sha1(user_salt + user_hashed_password).hexdigest()
  1. hashed_password = hashlib.sha1(password).hexdigest()

I'm still looking into a number of other problems that I'm having with HGRedmine that I suspect may be caused by changes in the database structure, once I get it all going I'll post the full hgredmine.py here and then see how I can get it back to either the original author or into a fork of the project somewhere.

RE: Can anybody help me with HGRedmine - Added by Declan Lynch over 13 years ago

I have forked the HGRedmine project here for anybody who may be interested

http://projects.qtzar.com/projects/hgredmine

RE: Can anybody help me with HGRedmine - Added by Alessio Caiazza over 13 years ago

I'm sorry but I had no contact with Brant Young (the original author) for more than one year.

I've imported the fix from Ammler's repo.

Bye

RE: Can anybody help me with HGRedmine - Added by Alessio Caiazza over 13 years ago

Pay attention: the above fix broke the sqlite compatibility!

I've releasead the version 1.1.1 which fix this issue.

I decided to bring up the HgRedmine work so the main repos is still https://bitbucket.org/nolith/hgredmine/
Stable releases will be pushed on https://bitbucket.org/redmine/hgredmine/
And issues, wiki and so on are located at http://hg4.me

I'm planning the development of HgRedmine 2.0.0 wich will be focussed on a better codebase (the 1.x.x is more a hack than a software); anyone interested in the development is wellcome.

    (1-5/5)