Skip to content
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

Calendar Setup and Permission Restructuring #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonathansampson
Copy link
Collaborator

This PR addresses a few issues. Primarily it introduces a new permission model which makes all permissions optional by default. This requires the user to explicitly opt-in to the Brave Talk for Calendars functionality on their preferred calendar(s). Secondly, to give the user the ability to identify which calendar(s) they use, this PR also introduces a new Calendar-Selection page.

The Calendar-Selection page is currently a work in progress. Here is it shown with Proton and Skiff enabled, but Google disabled:

image

Currently a single content script file is produced for all calendars, and injected into each calendar host when granted permission. The next step will be to generate a distinct content script for each host, and inject only the host-specific script when granted permission.

  • Generate host-specific content scripts
  • Finish styling of Calendar Selection page
  • Author new tests to cover changes to extension behavior

@jonathansampson jonathansampson added enhancement New feature or request in-process labels Aug 28, 2023
@jonathansampson jonathansampson self-assigned this Aug 28, 2023

async function toggleHostPerms( event ) {
const button = event.target.closest("button");
const origin = button.dataset.origin.replace("*", "");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[sveltegrep] button.dataset.origin.replace method will only replace the first occurrence when used with a string argument ("*"). If this method is used for escaping of dangerous data then there is a possibility for a bypass. Try to use sanitization library instead or use a Regex with a global flag.

Source: https://semgrep.dev/r/javascript.lang.security.audit.incomplete-sanitization.incomplete-sanitization


Cc @thypon @bcaller

@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@tsconfig/svelte 5.0.0 None +0 3.35 kB typescript-deploys
svelte-preprocess 5.0.4 eval, filesystem +23 6.61 MB dummdidumm
svelte2tsx 0.6.20 None +17 6.14 MB svelte-language-tools-deploy
svelte-loader 3.1.9 environment +18 5.75 MB dummdidumm
svelte 4.2.0 None +12 5.47 MB svelte-admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants