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

added redhat ga repo #142

Merged
merged 2 commits into from
Jun 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Flask-Admin>=1.0.7
Flask-Bcrypt
Flask-Bootstrap
Flask-Cache
Flask-Login>=0.1.1
Flask-Login==0.2.11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test with 0.2.x? Just want to make sure before hand 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I tested the app, but did not thoroughly check the unit tests. If we use 0.3 or later of Flask Login we run into a breaking change: https://github.com/maxcountryman/flask-login/blob/master/CHANGES#L25-L26

pymongo==2.6.2
mongoengine==0.8.4
Flask-MongoEngine==0.7.0
Expand Down
3 changes: 1 addition & 2 deletions src/victims_web/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@
]

# plugin.charon
MAVEN_REPOSITORIES = [
]
MAVEN_REPOSITORIES = [('jboss-ga', 'https://maven.repository.redhat.com/ga/')]

# WTF Config
WTF_CSRF_ENABLED = False
Expand Down
4 changes: 2 additions & 2 deletions src/victims_web/plugin/charon.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}
for (name, uri) in config.MAVEN_REPOSITORIES:
if (name, uri) not in REPOSITORIES:
REPOSITORIES['java'].append(name, uri)
REPOSITORIES['java'].append([name, uri])

MANAGERS = {}

Expand Down Expand Up @@ -85,13 +85,13 @@ def make_artifact(self, info):
def download(self, info):

def is_valid_sha1(value):
value = value.strip()
return value is not None and len(value) == 40

artifact = self.make_artifact(info)
queue = {}
for repo in self.repos:
uri = repo.get_artifact_uri(artifact, 'jar')
LOGGER.debug("Downloading from: %s" % uri)
sha1 = repo.download_check_sum('sha1', uri)
if is_valid_sha1(sha1) and sha1 not in queue:
queue[sha1] = repo
Expand Down
2 changes: 1 addition & 1 deletion test/mongo_test_user.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{ "_id" : { "$oid" :"51983e5220f35e4c6270f2eb"}, "active" : true, "createdon" : { "$date" : 1364154129966 }, "roles" : [], "lastip" : "127.0.0.1", "lastlogin" : { "$date" : 1364154129966 }, "password" : "$2a$13$jzd55nRBgL23cfK1LWjUMuxelZuTosZeaf3OopFVrcNvRspoh8Uau", "username" : "defaulttest" }
{ "_id" : { "$oid" : "521eb88ddd7b08149b99a01b"}, "username" : "nonadminuser", "password" : "$2a$13$uQfLF868IqHafwuIVpUJp.UbukEUaOGODWXuF4UIVKjfxcSkcdhzm", "roles" : [], "active" : true, "createdon" : { "$date" : 1364154129966 }, "lastlogin" : { "$date" : 1364154129966 }}
{ "_id" : { "$oid" : "521eb8a9dd7b08149b99a01c"}, "username" : "adminuser", "password" : "$2a$13$lAbe1EHDZrl4hhlM22BTeulM5NNM9.ddAYofVzC4ZqU.G9h4vvJoO", "roles" : ["admin"], "active" : true, "createdon" : { "$date" : 1364154129966 }, "lastlogin" : { "$date" : 1364154129966 } }
{ "_id" : { "$oid" : "521eb8a9dd7b08149b99a01c"}, "username" : "adminuser", "password" : "$2b$13$lJIhF3DI0/XZISyPr62KBeFWwNfdxYwACHtyRxRUHTljjtIXV/n6W", "roles" : ["admin"], "active" : true, "createdon" : { "$date" : 1364154129966 }, "lastlogin" : { "$date" : 1364154129966 } }