Skip to content

Commit 89a60d7

Browse files
Revert "fix security (#62626) (#62683)" (#62890)
This reverts commit 6a73547.
1 parent 0348f3f commit 89a60d7

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

python/paddle/base/core.py

-11
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import os
1616
import platform
17-
import re
1817
import site
1918
import sys
2019
import warnings
@@ -195,18 +194,8 @@ def run_shell_command(cmd):
195194
return out.decode('utf-8').strip()
196195

197196

198-
def is_valid_filename(filename):
199-
pattern = re.compile(r'^[a-zA-Z0-9_.-]+$')
200-
if pattern.match(filename):
201-
return True
202-
else:
203-
return False
204-
205-
206197
def get_dso_path(core_so, dso_name):
207198
if core_so and dso_name:
208-
assert is_valid_filename(core_so), 'core_so must be a file name.'
209-
assert is_valid_filename(dso_name), 'dso_name must be a file name.'
210199
return run_shell_command(
211200
f"ldd {core_so}|grep {dso_name}|awk '{{print $3}}'"
212201
)

0 commit comments

Comments
 (0)