fix: Bumps Flask Caching to fix RCE vulnerability (#25090)

This commit is contained in:
Michael S. Molina
2023-08-31 08:44:48 -03:00
committed by GitHub
parent 846c79ef55
commit 9df1b26654
13 changed files with 62 additions and 59 deletions

View File

@@ -27,6 +27,10 @@ from tests.integration_tests.base_tests import (
SupersetTestCase,
post_assert_metric,
)
from tests.integration_tests.fixtures.birth_names_dashboard import (
load_birth_names_dashboard_with_slices,
load_birth_names_data,
)
@pytest.fixture
@@ -95,6 +99,7 @@ def test_invalidate_cache_bad_request(invalidate):
assert rv.status_code == 400
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
def test_invalidate_existing_caches(invalidate):
schema = get_example_default_schema() or ""
bn = SupersetTestCase.get_birth_names_dataset()

View File

@@ -411,6 +411,7 @@ class TestCore(SupersetTestCase):
self.get_json_resp(f"/superset/warm_up_cache?slice_id={slc.id}")
ck = db.session.query(CacheKey).order_by(CacheKey.id.desc()).first()
assert ck.datasource_uid == f"{slc.table.id}__table"
db.session.delete(ck)
app.config["STORE_CACHE_KEYS_IN_METADATA_DB"] = store_cache_keys
def test_redirect_invalid(self):