Rule: Demo-test-internet
loading x elements...

Name: Demo-test-internet

Version: 5

Discussion Thread

Creator: floriandietz@elody.com

This Rule exists to test that internet access from within html message_components and by Programs is granted correctly.

ID: 279

Created: Feb. 25, 2019, 8:23 p.m.

full definition:

The below is the JSON description of this object.

It is annotated with links to the documentation of each component.

You can hide fields with default values to make things clearer, and copy it to a clipboard to make creating similar Rules and Options easier.

Rule

{ "name" : "Demo-test-internet", "description" : "This Rule exists to test that internet access from within html message_components and by Programs is granted correctly.", "dependencies" : [

Dependency

{ "symbol" : "demo_test_internet" }
], "threshold" : 1.0, "trigger" :

Trigger

{ }
, "actions" : [

Create a Tag

{ "type" : "create_tag", "symbol" : "!external_domain_request", "comment" : "placeholder.com" }
,

Create a Message

{ "type" : "create_message", "message_components" : [

HTML component

{ "type" : "html", "html" : "\nonly placeholder.com is allowed. No image should show, because the images refer to a subdomain of placeholder.com and those need to be allowed separately.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "placeholder.com" ] }
] }
,

Create a Message

{ "type" : "create_message", "message_components" : [

HTML component

{ "type" : "html", "html" : "\nonly *.placeholder.com is allowed, so only the first image should show. the second uses http, so it shouldn't show.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "*.placeholder.com" ] }
] }
,

Create a Message

{ "type" : "create_message", "message_components" : [

HTML component

{ "type" : "html", "html" : "\nthe first two are from an explicitly allowed website. this also needs full internet access though, so all 4 should display properly.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "*.placeholder.com", "full_internet_access" ] }
] }
,

Create a Message

{ "type" : "create_message", "message_components" : [

HTML component

{ "type" : "html", "html" : "\nall 4 images are from disallowed websites.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "example.com" ] }
] }
,

Create a Message

{ "type" : "create_message", "message_components" : [

HTML component

{ "type" : "html", "html" : "\nall 4 images are from disallowed websites. Also: external_domains is empty, so this should use an iframe with srcdoc instead of src if the developer who created this is trusted with internet access. You can test this by clicking <a target=\"_blank\" href=\"https://via.placeholder.com/350x65\">this link</a>, which only works if allow-popups is set on the iframe, which is true only for the srcdoc variant.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n" }
] }
,

Create an Option

{ "type" : "create_option", "var" : "foo", "name" : "foo", "confidence" : 100, "trigger" :

Trigger

{ }
, "actions" : [

Execute a Program

{ "type" : "execute_program", "program" : "InternetTestProgram" }
] }
], "existing_variables" : { "foo" :

Variable

{ "type" : "option" }
} }

Rule

{ "name" : "Demo-test-internet", "description" : "This Rule exists to test that internet access from within html message_components and by Programs is granted correctly.", "dependencies" : [

Dependency

{ "symbol" : "demo_test_internet", "weight" : 1.0, "comment_filter" : null }
], "threshold" : 1.0, "trigger" :

Trigger

{ "repeat" : "never", "arguments" : [], "deactivate_if" : {} }
, "actions" : [

Create a Tag

{ "type" : "create_tag", "var" : null, "symbol" : "!external_domain_request", "comment" : "placeholder.com", "weight" : null, "arguments" : [], "mark_with" : [] }
,

Create a Message

{ "type" : "create_message", "var" : null, "visibility" : "all", "message_components" : [

HTML component

{ "type" : "html", "scenario_history" : false, "scenario_history_title" : null, "scenario_history_description" : null, "html" : "\nonly placeholder.com is allowed. No image should show, because the images refer to a subdomain of placeholder.com and those need to be allowed separately.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "placeholder.com" ] }
] }
,

Create a Message

{ "type" : "create_message", "var" : null, "visibility" : "all", "message_components" : [

HTML component

{ "type" : "html", "scenario_history" : false, "scenario_history_title" : null, "scenario_history_description" : null, "html" : "\nonly *.placeholder.com is allowed, so only the first image should show. the second uses http, so it shouldn't show.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "*.placeholder.com" ] }
] }
,

Create a Message

{ "type" : "create_message", "var" : null, "visibility" : "all", "message_components" : [

HTML component

{ "type" : "html", "scenario_history" : false, "scenario_history_title" : null, "scenario_history_description" : null, "html" : "\nthe first two are from an explicitly allowed website. this also needs full internet access though, so all 4 should display properly.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "*.placeholder.com", "full_internet_access" ] }
] }
,

Create a Message

{ "type" : "create_message", "var" : null, "visibility" : "all", "message_components" : [

HTML component

{ "type" : "html", "scenario_history" : false, "scenario_history_title" : null, "scenario_history_description" : null, "html" : "\nall 4 images are from disallowed websites.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [ "example.com" ] }
] }
,

Create a Message

{ "type" : "create_message", "var" : null, "visibility" : "all", "message_components" : [

HTML component

{ "type" : "html", "scenario_history" : false, "scenario_history_title" : null, "scenario_history_description" : null, "html" : "\nall 4 images are from disallowed websites. Also: external_domains is empty, so this should use an iframe with srcdoc instead of src if the developer who created this is trusted with internet access. You can test this by clicking <a target=\"_blank\" href=\"https://via.placeholder.com/350x65\">this link</a>, which only works if allow-popups is set on the iframe, which is true only for the srcdoc variant.<br>\n<p><img src=\"https://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"http://via.placeholder.com/350x65\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://via.placeholder.com/350x65\")'>try to open this image externally</a></p>\n<p><img src=\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n<p><img src=\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\"/></p>\n<p><a onclick='communicationWithElody.popup(\"http://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg\")'>try to open this image externally</a></p>\n", "external_domains" : [] }
] }
,

Create an Option

{ "type" : "create_option", "var" : "foo", "name" : "foo", "description" : null, "confidence" : 100, "trigger" :

Trigger

{ "repeat" : "never", "arguments" : [], "deactivate_if" : {} }
, "display" : null, "actions" : [

Execute a Program

{ "type" : "execute_program", "var" : null, "program" : "InternetTestProgram", "arguments" : {}, "argument_lists" : {} }
] }
], "existing_variables" : { "foo" :

Variable

{ "type" : "option", "value" : null }
} }

all versions of this Rule:

Version 5

Version 4 (deleted)

Version 3 (deleted)

Version 2 (deleted)

Version 1 (deleted)