Skip to content

Commit

Permalink
added redhat ga repo (#142)
Browse files Browse the repository at this point in the history
* added redhat ga repo

* fixed bool change in flask-login and changed test adminuser password
  • Loading branch information
jasinner authored and ashcrow committed Sep 29, 2016
1 parent 23bd611 commit 766c3f5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
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
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 } }

0 comments on commit 766c3f5

Please sign in to comment.