oss-sec mailing list archives

vos tmp vuln


From: Kurt Seifried <kseifried () redhat com>
Date: Tue, 09 Sep 2014 00:50:07 -0600

https://pypi.python.org/pypi/vos

filed at https://github.com/canfar/vos/issues/42

vos-1.10.4/vos/md5_cache.py

import sqlite3, logging
READBUF = 8192

class MD5_Cache:

    def __init__(self, cache_db="/tmp/#vos_cached.db#"):
        """Setup the sqlDB that will contain the cache table"""
        self.cache_db = cache_db

        ## initialize the md5Cache db
        sqlConn = sqlite3.connect(self.cache_db)
        with sqlConn:
            sqlConn.execute("create table if not exists md5_cache (fname
text PRIMARY KEY NOT NULL , md5 text, st_size int, st_mtime int)")
        ## build cache lookup if doesn't already exists


-- 
Kurt Seifried -- Red Hat -- Product Security -- Cloud
PGP A90B F995 7350 148F 66BF 7554 160D 4553 5E26 7993

Attachment: signature.asc
Description: OpenPGP digital signature


Current thread: