Skip to content

Commit

Permalink
Revert "[Security] fix download security problem (PaddlePaddle#61162) (
Browse files Browse the repository at this point in the history
…PaddlePaddle#61388)"

This reverts commit 5f3bbeb.
  • Loading branch information
hanhaowen-mt committed May 13, 2024
1 parent efc4981 commit 7a9ad11
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions python/paddle/dataset/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import importlib
import os
import pickle
import re
import shutil
import sys
import tempfile
Expand Down Expand Up @@ -72,11 +71,6 @@ def md5file(fname):


def download(url, module_name, md5sum, save_name=None):
module_name = re.match("^[a-zA-Z0-9_/\\-]+$", module_name).group()
if isinstance(save_name, str):
save_name = re.match(
"^(?:(?!\\.\\.)[a-zA-Z0-9_/\\.-])+$", save_name
).group()
dirname = os.path.join(DATA_HOME, module_name)
if not os.path.exists(dirname):
os.makedirs(dirname)
Expand Down

0 comments on commit 7a9ad11

Please sign in to comment.