Skip to content

Instantly share code, notes, and snippets.

View fmarier's full-sized avatar

Francois Marier fmarier

View GitHub Profile
@fmarier
fmarier / brave-password-storage-linux.md
Created August 9, 2023 23:21
Testing the Brave password manager backend on Linux

Saving a password in a new profile

First of all, let's start with a clean slate:

  1. Exit any Brave Browser.
  2. Open the seahorse application.
  3. WARNING: continuing will wipe all of your passwords in ALL Brave profiles.
  4. Look for "Brave Safe Storage" and right-click on it. Delete.
  5. Close the seahorse application.
@fmarier
fmarier / download-protection-debugging.patch
Created March 10, 2023 23:27
Debugging statements to help figure out why downloads are blocked by Safe Browsing in Chromium
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 45115ca156fbd4525eab6c380afb7b3dbe8b7d6c..2b665d06aaf4e237206136dcf8a259b5505cdbaa 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -1348,10 +1348,14 @@ void ChromeDownloadManagerDelegate::CheckClientDownloadDone(
}
DCHECK_NE(danger_type,
download::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT);
+ // https://source.chromium.org/chromium/chromium/src/+/main:components/safe_browsing/core/browser/download_check_result.h;l=12;drc=e94294450e2ac29ad5ce1f3c2be745abe71d7d88
+ // https://source.chromium.org/chromium/chromium/src/+/main:components/download/public/common/download_danger_type.h;l=17;drc=e94294450e2ac29ad5ce1f3c2be745abe71d7d88
commit 821011f88341c997a1f8e365cbbb99d3656a0342
Author: Francois Marier <[email protected]>
Date: Thu Nov 24 12:21:38 2022 -0800
Hide Twitter's tracking parameter from Service Workers (fixes brave/brave-browser#26910)
WIP: DO NOT MERGE!
diff --git a/browser/net/brave_site_hacks_network_delegate_helper.cc b/browser/net/brave_site_hacks_network_delegate_helper.cc
index ccda9c5cfa..a5ad26a583 100644
<ul>
<li>same-origin image: <img src="/brave-browser-25939/onion16.png"></li>
<li>HTTPS image: <img src="https://fmarier.org/brave-browser-25939/onion16.png"></li>
<li>HTTP image: <img src="http://fmarier.com/brave-browser-25939/onion16.png"></li>
<li>HTTP Onion image: <img src="http://ixrdj3iwwhkuau5tby5jh3a536a2rdhpbdbu6ldhng43r47kim7a3lid.onion/brave-browser-25939/onion16.png"></li>
</ul>
@fmarier
fmarier / clean-urls.json
Last active August 24, 2022 20:00
Sample list for the copy clean URLs feature
[
{
"include": [
"*://*.twitter.com/*"
],
"exclude": [
],
"params": [
"t"
]
commit 8cad760b6aa583ab576fc7e69a5dab6091bef4ab
Author: Francois Marier <[email protected]>
Date: Mon Jun 7 20:56:21 2021 -0700
Add a --safebrowsing-manual-extension-blocklist flag.
This lets users add one or more extension IDs (separated by commas)
that should be marked as "BLOCKLISTED_MALWARE" as if they were
malware. This is used for testing the crx-list-info endpoint.
@fmarier
fmarier / quad9.org
Created April 20, 2022 00:14
Defending against nation-state (legal) attack: how to build a privacy-protecting service in the era of ubiquitous surveillance
@fmarier
fmarier / resolve-urls.py
Created January 4, 2022 05:15
Expand URLs for Brave News RSS feeds
#!/usr/bin/python3
import csv
import requests
from urllib.parse import urlparse, urlunparse
def feedburner_upgrade(url):
parsed = urlparse(url)
if parsed.netloc in ('feeds2.feedburner.com', 'feeds.feedburner.com', 'feedproxy.google.com'):
return parsed._replace(scheme='https').geturl()
FILE: /home/francois/devel/admin-columns/src/js/admin/columns/form.js
----------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
158 | ERROR | HTML string concatenation detected, this is a security risk, use DOM node construction or a
| | templating language instead: attr_class+. (WordPressVIPMinimum.JS.StringConcat.Found)
158 | ERROR | HTML string concatenation detected, this is a security risk, use DOM node construction or a
| | templating language instead: message+. (WordPressVIPMinimum.JS.StringConcat.Found)
158 | ERROR | HTML string concatenation detected, this is a security risk, use DOM node construction or a
| | templating language instead: +'</p></div>'. (WordPressVIPMinimum.JS.StringConcat.Found)
--- poppins1.css 2019-11-15 17:41:43.198503250 -0800
+++ poppins2.css 2019-11-15 17:41:58.294222079 -0800
@@ -1,4 +1,51 @@
-
+/* devanagari */
+@font-face {
+ font-family: 'Poppins';
+ font-style: italic;
+ font-weight: 100;
+ src: url(./poppins/Poppins_100_italic_0d7e19fe5b51588a56ee51ac676b63d8_devanagari_v5.woff2) format('woff2');