Skip to content

Commit

Permalink
🐛 Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wakeful-Cloud committed May 21, 2024
1 parent a905ec2 commit 24f2789
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deployment/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
Strict-Transport-Security "max-age=63072000; includeSubDomains"
Cross-Origin-Opener-Policy "same-origin"
Cross-Origin-Resource-Policy "same-site"
Content-Security-Policy "default-src 'self'; connect-src 'self' {$CADDY_SUPABASE_URL} https://hcaptcha.com https://*.hcaptcha.com; font-src 'self' data:; frame-src 'self' https://hcaptcha.com https://*.hcaptcha.com; img-src 'self' blob:; media-src 'self' blob:; script-src 'self' 'sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=' 'sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=' 'sha256-VA8O2hAdooB288EpSTrGLl7z3QikbWU9wwoebO/QaYk=' 'sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=' https://hcaptcha.com https://*.hcaptcha.com; style-src 'self' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com;"
Content-Security-Policy "default-src 'self'; connect-src 'self' {$CADDY_SUPABASE_URL} https://hcaptcha.com https://*.hcaptcha.com; font-src 'self' data:; frame-src 'self' https://hcaptcha.com https://*.hcaptcha.com; img-src 'self' blob: https://*.basemaps.cartocdn.com; media-src 'self' blob:; script-src 'self' 'sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=' 'sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=' 'sha256-VA8O2hAdooB288EpSTrGLl7z3QikbWU9wwoebO/QaYk=' 'sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=' https://hcaptcha.com https://*.hcaptcha.com; style-src 'self' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com;"
Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=self, battery=(), bluetooth=(), browsing-topics=(), camera=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=self, gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), otp-credentials=(), payment=(), picture-in-picture=(), publickey-credentials-create=self, publickey-credentials-get=self, screen-wake-lock=(), serial=(), speaker-selection=(), storage-access=(), usb=(), web-shared=(), window-management=(), xr-spatial-tracking=(), interest-cohort=()"
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/step1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const Step1: FC = () => {
email: form.email,
options: {
captchaToken: form.captchaToken,
emailRedirectTo: new URL("/nearby", window.location.origin).toString(),
emailRedirectTo: new URL("/auth/2", window.location.origin).toString(),
data: {
acceptedTerms: false,
} as UserMetadata,
Expand Down
3 changes: 2 additions & 1 deletion supabase/migrations/20240508051432_functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,15 @@ BEGIN

-- Add some uncertainty relative to the post's radius (To increase resistance against static trilateration attacks)
NEW.private_location = extensions.ST_Project(
_old_location::GEOGRAPHY,
_old_location::extensions.GEOGRAPHY,
(-(_uncertainty / 2) * NEW.radius) + (_uncertainty * NEW.radius * utilities.safe_random()),
2 * PI() * utilities.safe_random()
);

RETURN NEW;
END;
$$;

-- Post deleted trigger function
CREATE OR REPLACE FUNCTION utilities.post_deleted_trigger()
RETURNS TRIGGER
Expand Down
4 changes: 2 additions & 2 deletions supabase/migrations/20240508051700_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
CREATE VIEW public.personalized_posts
WITH (
security_barrier = TRUE,
security_invoker = TRUE
security_invoker = FALSE
)
AS (
WITH personalized_post AS (
Expand Down Expand Up @@ -71,7 +71,7 @@ AS (
CREATE VIEW public.personalized_comments
WITH (
security_barrier = TRUE,
security_invoker = TRUE
security_invoker = FALSE
)
AS (
WITH personalized_comment AS (
Expand Down

0 comments on commit 24f2789

Please sign in to comment.