From c14672d6cd6dcc6d5103b63ff65021faa36ea174 Mon Sep 17 00:00:00 2001 From: Gabriel Martinez <144209867+NightAcrobat777@users.noreply.github.com> Date: Wed, 25 Oct 2023 02:08:31 -0700 Subject: [PATCH 1/4] Support emojis in new UI (#2951) * fix issue 2802 - emoji support in the new UI --------- Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com> --- timesketch/frontend-ng/src/components/Explore/EventList.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/timesketch/frontend-ng/src/components/Explore/EventList.vue b/timesketch/frontend-ng/src/components/Explore/EventList.vue index cdebfdc697..9d670ba071 100644 --- a/timesketch/frontend-ng/src/components/Explore/EventList.vue +++ b/timesketch/frontend-ng/src/components/Explore/EventList.vue @@ -359,14 +359,14 @@ limitations under the License. - + {{ emoji }} + > {{ item._source[field.text] }} From c7f5a91d30a7be3b919847177f3b8cdd92e4af5d Mon Sep 17 00:00:00 2001 From: Ataf Fazledin Ahamed Date: Wed, 25 Oct 2023 16:10:14 +0600 Subject: [PATCH 2/4] SSL/TLS support and authentication for SMTP (#2940) * Added SSL/TLS support and authentication for SMTP * Update timesketch/lib/utils.py * Update data/timesketch.conf * Update timesketch/lib/utils.py * Update timesketch/lib/utils.py --------- Co-authored-by: Johan Berggren --- data/timesketch.conf | 8 ++++++++ timesketch/lib/utils.py | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/data/timesketch.conf b/data/timesketch.conf index be412a30df..7918de6679 100644 --- a/data/timesketch.conf +++ b/data/timesketch.conf @@ -311,6 +311,14 @@ EMAIL_RECIPIENTS = [] # Configuration to construct URLs for resources. EXTERNAL_HOST_URL = 'https://localhost' +# SSL/TLS support for emails +EMAIL_TLS = False +EMAIL_SSL = False + +# Email support for authentication +EMAIL_AUTH_USERNAME = "" +EMAIL_AUTH_PASSWORD = "" + #------------------------------------------------------------------------------- # Sigma Settings diff --git a/timesketch/lib/utils.py b/timesketch/lib/utils.py index 6ac665ae04..eb7d00453b 100644 --- a/timesketch/lib/utils.py +++ b/timesketch/lib/utils.py @@ -598,6 +598,10 @@ def send_email(subject, body, to_username, use_html=False): email_smtp_server = current_app.config.get("EMAIL_SMTP_SERVER") email_from_user = current_app.config.get("EMAIL_FROM_ADDRESS", "timesketch") email_user_whitelist = current_app.config.get("EMAIL_USER_WHITELIST", []) + email_login_username = current_app.config.get("EMAIL_AUTH_USERNAME") + email_login_password = current_app.config.get("EMAIL_AUTH_PASSWORD") + email_ssl = current_app.config.get("EMAIL_SSL") + email_tls = current_app.config.get("EMAIL_TLS") if not email_enabled: raise RuntimeError("Email notifications are not enabled, aborting.") @@ -626,6 +630,28 @@ def send_email(subject, body, to_username, use_html=False): msg.add_header("Content-Type", email_content_type) msg.set_payload(body) + # EMAIL_SSL in timesketch.conf must be set to True + if email_ssl: + smtp = smtplib.SMTP_SSL(email_smtp_server) + if email_login_username and email_login_password: + smtp.login(email_login_username, email_login_password) + smtp.sendmail(msg["From"], [msg["To"]], msg.as_string()) + smtp.quit() + return + # EMAIL_TLS in timesketch.conf must be set to True + if email_tls: + smtp = smtplib.SMTP(email_smtp_server) + smtp.ehlo() + smtp.starttls() + if email_login_username and email_login_password: + smtp.login(email_login_username, email_login_password) + smtp.sendmail(msg["From"], [msg["To"]], msg.as_string()) + smtp.quit() + return + + # default - no SSL/TLS configured smtp = smtplib.SMTP(email_smtp_server) + if email_login_username and email_login_password: + smtp.login(email_login_username, email_login_password) smtp.sendmail(msg["From"], [msg["To"]], msg.as_string()) smtp.quit() From e061a894f45701802fcfb57e80eb709b8f49157e Mon Sep 17 00:00:00 2001 From: Johan Berggren Date: Wed, 25 Oct 2023 12:10:36 +0200 Subject: [PATCH 3/4] Instantiate side panel only once (#2949) * Create side panel only once * rounded buttons and bug fix * Move progressbar * fix layout --------- Co-authored-by: Janosch <99879757+jkppr@users.noreply.github.com> --- .../src/components/LeftPanel/Search.vue | 5 +- .../src/components/LeftPanel/Stories.vue | 6 +- .../src/components/LeftPanel/Tags.vue | 4 +- .../src/components/LeftPanel/ThreatIntel.vue | 2 +- timesketch/frontend-ng/src/views/Sketch.vue | 596 +++++++++--------- 5 files changed, 310 insertions(+), 303 deletions(-) diff --git a/timesketch/frontend-ng/src/components/LeftPanel/Search.vue b/timesketch/frontend-ng/src/components/LeftPanel/Search.vue index 4f97cbc1fc..375475a26d 100644 --- a/timesketch/frontend-ng/src/components/LeftPanel/Search.vue +++ b/timesketch/frontend-ng/src/components/LeftPanel/Search.vue @@ -16,7 +16,7 @@ limitations under the License.