From 0cc6a780a5acaf1722eb3653f4a751d5c63d6808 Mon Sep 17 00:00:00 2001 From: Kawa Kokosowa Date: Sat, 10 Nov 2018 20:10:35 -0800 Subject: [PATCH 1/3] requests & flask to new versions (security fix) Update requests & flask to new versions due to security vulnerability brought to my attention by GitHub alerts. --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4b0eb65..49fd594 100755 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ bleach==2.1.3 bs4==0.0.1 click==6.7 colorhash==1.0.2 -Flask==0.12.2 +Flask==0.12.3 Flask-Admin==1.5.1 Flask-Limiter==1.0.1 Flask-Login==0.4.1 @@ -26,7 +26,7 @@ py==1.5.3 pymojihash==0.4.0 pytest==3.5.0 redis==2.10.6 -requests==2.6.0 +requests==2.20.0 scrypt==0.8.6 six==1.9.0 SQLAlchemy==1.2.5 From d75229bdb386083388bd28998cb7c07c4dddcd0d Mon Sep 17 00:00:00 2001 From: Kawa Kokosowa Date: Sat, 10 Nov 2018 20:18:26 -0800 Subject: [PATCH 2/3] Use latest requests, flask dependencies --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 49fd594..e8c3cc0 100755 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ bleach==2.1.3 bs4==0.0.1 click==6.7 colorhash==1.0.2 -Flask==0.12.3 +Flask==1.0.2 Flask-Admin==1.5.1 Flask-Limiter==1.0.1 Flask-Login==0.4.1 @@ -26,7 +26,7 @@ py==1.5.3 pymojihash==0.4.0 pytest==3.5.0 redis==2.10.6 -requests==2.20.0 +requests==2.20.1 scrypt==0.8.6 six==1.9.0 SQLAlchemy==1.2.5 From 7827bcd2e952f1f8fc1cc3d893f0b026e2192b55 Mon Sep 17 00:00:00 2001 From: Kawa Kokosowa Date: Sat, 10 Nov 2018 20:26:44 -0800 Subject: [PATCH 3/3] update outdated flask.ext imports No longer supported by Flask 1.x --- bubblebbs/moderate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bubblebbs/moderate.py b/bubblebbs/moderate.py index 6f185c5..a383d6d 100755 --- a/bubblebbs/moderate.py +++ b/bubblebbs/moderate.py @@ -6,12 +6,13 @@ import typing from flask import Flask, url_for, redirect, render_template, request -from flask.ext.sqlalchemy import SQLAlchemy +from flask_sqlalchemy import SQLAlchemy from wtforms import form, fields, validators -from flask.ext import admin, login +import flask_admin as admin +import flask_login as login from sqlalchemy.exc import IntegrityError -from flask.ext.admin.contrib import sqla -from flask.ext.admin import helpers, expose +from flask_admin.contrib import sqla +from flask_admin import helpers, expose from werkzeug.security import generate_password_hash, check_password_hash from jinja2 import Markup