-
Notifications
You must be signed in to change notification settings - Fork 3
fix(propertydata): eval propertydata calculations #351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| if not re.fullmatch(r"[A-Za-z0-9._/-]+", base_branch) or base_branch.startswith("-"): | ||
| raise ValueError(f"Invalid base branch ref: {base_branch!r}") | ||
|
|
||
| subprocess.run(["git", "fetch", "origin"], check=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use subprocess instead of popen
| status = "successful" if self.server.token else "failed (no token found)" | ||
| self.send_response(200) | ||
| self.send_header("Content-Type", "text/html") | ||
| self.send_header( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set CSP header in response
| _ALLOWED_NAMES = {"pi": math.pi} | ||
|
|
||
|
|
||
| def _safe_eval_math(*, expression: str) -> float: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use custom eval using ast.eval insteaf of eval()
lkubie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.