Skip to content
Snippets Groups Projects
Unverified Commit 51ccfa49 authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

use more descriptiive allow/deny for vars (#14239)

parent 125e7d97
No related branches found
No related tags found
No related merge requests found
......@@ -547,7 +547,7 @@ export function formatTime(value: Value) {
}
// https://github.com/angular/angular.js/blob/v1.6.3/src/ng/directive/input.js#L27
const EMAIL_WHITELIST_REGEX = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;
const EMAIL_ALLOW_LIST_REGEX = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;
export function formatEmail(
value: Value,
......@@ -559,7 +559,7 @@ export function formatEmail(
jsx &&
rich &&
(view_as === "email_link" || view_as === "auto") &&
EMAIL_WHITELIST_REGEX.test(email)
EMAIL_ALLOW_LIST_REGEX.test(email)
) {
return (
<ExternalLink href={"mailto:" + email}>{link_text || email}</ExternalLink>
......
......@@ -22,8 +22,8 @@ type Props = {
value: Settings,
onChange: (settings: Settings) => void,
column: any,
whitelist?: Set<SettingId>,
blacklist?: Set<SettingId>,
allowlist?: Set<SettingId>,
denylist?: Set<SettingId>,
inheritedSettings?: Settings,
};
......@@ -31,8 +31,8 @@ const ColumnSettings = ({
value,
onChange,
column,
whitelist,
blacklist,
allowlist,
denylist,
inheritedSettings = {},
}: Props) => {
const storedSettings = value || {};
......@@ -65,8 +65,8 @@ const ColumnSettings = ({
{ series },
).filter(
widget =>
(!whitelist || whitelist.has(widget.id)) &&
(!blacklist || !blacklist.has(widget.id)),
(!allowlist || allowlist.has(widget.id)) &&
(!denylist || !denylist.has(widget.id)),
);
return (
......
......@@ -11,7 +11,7 @@ const EXPRESSION_OPERATORS = new Map([
["pow", (x, y) => `Math.pow(${x}, ${y})`],
["exp", x => `Math.pow(Math.E, ${x})`],
]);
// whitelist of allowed expressions
// list of allowed expressions
const EXPRESSION_IDENTIFIERS = new Set(["x"]);
function compileNode(node) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment