#👾-core-development
1 messages · Page 257 of 1
📮?
lc.ocr
bad ocr
LOL
o not 0
vencord users have no shame
bro thinks vencord is wallpaper engine
a
Was about to say litterbox but thats temporary uploading and would be pointless
indeed
all it takes is 10 minutes to fix all the theme issues and people are complaining
can you use images hosted on discord? that seems like the easiest solution
cdn links expire
the client should auto regenerate them if retrieved from within the client, no?
does that not work when used in this way I guess?
no
im pretty that only works for links sent in chat
these are all just being fetched via the browser itself
yeah just tried it. makes sense
Content
Hi! Since i started using vencord about 6 months ago i've been hosting the images i use for my vencord backgrounds on my own private web server. Today i restarted discord and my background no longer loads and it says the domain is blocked. how can i override this? i will recompile vencord if i have to as i do not feel comfortable using a third party site to host my images as this both increases load times, increases my overall reliance on things not hosted by me and creates a dat...
lol
creates a data privacy issue yet you're literally here on github right now okay
oh self hosted cloud sync...
Thought so haha
idk how to fix that honestly
I’ll just use the public one in the meantime
You could require a specific path. Like "*/vc-cloudsync". if people are able to selfhost it, then they should be also able to configure a path on their reverse proxy
we will sunset the feature of custom cloud sync server
Or that lol
Stopped being lazy and did it properly
Code in work hours or code after midnight, no inbetween
nah
I'll fix it dw
Average AWS free tier user
insane 😭
i do that
or keep original idea of premium gating no CSP
donors all deserve to be hacked
Honestly it could just be toggled by dev mode
like i said earlier, a toggle somewhere to disable it with a ton of warnings
nah
That's technically just creating potential for more scam
"to use this theme you must first click these 3 warnings!!!!"
So useless
or maybe just add the toggle if it is built from source?
damn i didnt see that part
But yeah I doubt any malicious person would guide through a pnpm install atp just trick the victim into using a malicious installer
oh wait, i forgot, midnight uses wikipedia for the moon icon 
that's not really what csp is protecting you from
Just quickcss it away
but yes blanket disable will never be added
No it's not but if someone wanted to use a theme maliciousoy 
yeah should be able to defer the majority of the users, and the minority should be suspicious
it's not really to prevent you from malicious themes anyway
a good csp is very beneficial in many regards
unfortunately discords csp is not good in the first place so you miss out on a lot of potential security but hey it's better than nothing
Fair
is wikimedia not whitelisted
husk

doesnt seem like so
seems reasonable as something to whitelist tbh
@austere talon you are terrible and everything you touch turns to ash
"wait you didn't whitelist hundreds of different niche domains of big websites that maybe 2 themes in existence use????"

Contrib badge is updated to work with CSP changes
fafa
hello
hiiii
i woke up to my plugin exploding

DisableCsp plugin coming soon
nuh uh
@austere talon you forgot companion csp 
i will pr guhhhhhh
crumbsniffer was using my fork
csp broke it 
connect-src 'self' ws:;
wtf is that
so fake
does discord not pass that already
arrpc works
show the csp error
never
insane
sadan is just insane
u made the change on built in companion
his fork just needed it too
soon
the evil ".concat(b ? "0" : "1") vs the wonderful ${+!b}`
explain
tf is that
the concat isn't real discord code
it's their bundler
the source code is format string
¯_(ツ)_/¯
no real person uses concat
insane bundler then
Fixes Imgur support, instead of only being able to use i.imgur.com links it can use *.imgur.com letting people directly refer to the image.
Adds Gofile support. Self explanatory.
H-h-h-h-h-h-h-h-h-h-h-h-hey vencord owner 🥹 Can you merge ❤️
fym directly refer to image
non direct like won't even work
and I disagree with adding gofile
Adds the host of the configured Vencord cloud URL to connect-src in the new Content Security Policy implementation.
???
you can embed imgur links using imgur.com instead of i.imgur.com
how come?
this is not safe technically. but yes I am aware and will fix this properly soon
any value coming from the renderer is inherently unsafe and shouldn't be trusted, otherwise context isolation is pointless
a safe way to implement this would be to have ipc methods for whitelisting domains, showing an explicit native confirmation modal and then storing this in a separate settings file the renderer has no access to (NativeSettings)
that's exactly what I was planning on adding
Why would you use reddit...? Posts can be deleted, subreddits closed, accounts stolen and emptied
Damn, your fix works well, been waiting ages for it to get merged 🗿
I think you should create an open issue describing the problem and then link the pull request that solves it, better workflow for it to be seen.
Damn, your fix works well, been waiting ages for it to get merged 🗿 I think you should create an open issue describing the problem and then link the pull request that solves it, better workflow for it to be seen.
vendicated doesn't want to fix it, use custom vencord
You could always bring up the PR in the core-development channel. Maybe it got lost
You could always bring up the PR in the core-development channel. Maybe it got lost
i don't have access to it and i don't see "I want my PR to be reviewed and merged" in modmail
i don't think playing the game of adding random shady filehosts because 2 themes use it is a good idea
How is gofile a shady file host 💔
Seriously what is the point in this stupid csp shit
Oh no imma get ip logged
💔
Csp does not exist to protect you from malicious themes
It's one of many layers of defense to protect you from unexpected threats
What unexpected threats am I gonna get from css
Nothing
It blocks domains for the entire app, not just css
Css is not dangerous
My snippets 
Yeah but someone can easily just upload the script to github and call it a day
(Though it can burn your cpu to pieces if you're stupid)
BREAKING NEWS: New widespread XSS attack on discord only affects Vencord because they are too fucking stupid to set up CSP correctly
If someone manages to execute arbitrary code via a github link, you have worse problems than your discord being hacked
Also fun fact guys, if you don't like CSP, just remove it by reverting the commit on your fork <3
But yes, permitting GH is also somewhat dangerous
Problem solved
It's just that vencord couldn't work without it so it's a compromise
Oh sorry, that was from an alternate universe where vencord didnt actually bother to set up CSP! glad we did!
And this hasn't happened at all on any other mod because why. Also, the browser version of discord already has csp enabled. The discord app also doesn't have cookies to other websites. This literally solves nothing lmao
If yo shit is broken by csp, fix yo shit
Nooo wym someone wants to host their own images
sorry..
Fuck is that emoji
Connecting to arbitrary untrusted websites is a bad idea
i fucking hate discord
because no widespread XSS attack has been found yet that is specifically mitigated by CSP ¯_(ツ)_/¯
Don't we all
Then let the user disable copy
Csp
Dont force keep it enabled
Are you offended by "warning: do not swim with piranhas" signs as well?
No? 😭
I just think its stupid that its not an option the user can disable
It should be on by default
Then why are you offended by this particular "do not swim with piranhas" sign
if you know how to clone the source, remove csp you can do that!
if you dont, you shouldnt! as shrimple as that
Theres a difference between a discord mod and death
What is your point here
Yeah you'll only get your account hacked rather than your leg being bitten off
Literally what i'm saying
Again, you can literally load stuff directly from github
that adding a specific option exposes people to danger and if this gets abused by a malicious attacker later on vencord & other client mods will be blamed
having the knowledge to dig through code and remove csp means you should know how dangerous disabling csp is
this is exactly the same thought behind userplugins
The guy that use cursor : nah i just told it to remove CSP and everything is fine
Maybe, get this, the user should know what they're installing 😱
Yes
Indeed
User can install a vulnerable custom build if they want
But most users don't want vulnerabilities I think
now snap back to reality & most people dont
most people dont know what the funny switches do in your settings & most people dont know what csp actually is
& the users will still blame vencord when something goes wrong
So what if they blame vencord? Not like anythings going to change. That's like blaming windows for letting you install a virus
Because you are asking for vencord to add a "allow vulnerability" switch
vencords reputation gets fucked and people will stop using vencord
And yes, windows allows you to install viruses
It does its darnedest to prevent viruses from installing themselves by receiving a malicious chat message, though
Discord has context isolation on in electron. There is no benefit to this especially when they can again, put the script on github.
Windows literally use many popups to prevent you from installing shit on your own machine
Sometimes even blocking legit stuff
No they dont bro😭
That's windows defender not windows
And it's annoying
But it's F great so i don't have to fix my grandpa computer every fucking day
Exactly the same
Vencord now ship with Vencord Defender
If you are not happy, clone the code and remove it and that's it
I can uninstall and disable windows defender
Windows defender is a separate app shlawg🥹
By actually digging deep and forcing Windows, same shit here
Get the code, change it and you good
Yes and you will make every security-aware person on the earth cringe if you do so despite the dozen warnings you get
You can build Vencord yourself and disable csp
Write yourself a userplugin to add specific ones you want dynamically if you want, it's just not supported officially
This will only make this situation worse. People will go to shady repos where csp is disabled and God knows what is in there.
This is a literal perfect attack vector
do you genuinely think people without any knowledge of csp will see "failed to fetch" or "unsupported domain" or whatever and google "vencord without csp" & download vencord from an unofficial source instead of the theme developer just changing their theme to use a valid url 😭
CSP here exist to make sure that Ven isn't liable for you getting hacked
If you want that responsability release Kodacord without CSP, but stop complaining
fun fact a theme can log your (first 3 digits of) user ID or whatever you're typing ask @inland fable he's done like 900 of these POCs
the resource itself is irrelevant
the resource host is
your average idiot uses themes with sane resources
only like two people will link hsdxd gifs from tenor (real world example)
Damn bro let it go
Im tired and dont wanna argue anymore
discord own csp is so crap it doesn't even prevent XSS
discord moment
Wot how ?
I'd actually like to understand how the F it could even do that
so no it can't stop XSS unfortunately because of discord
if discord used a better csp I would also make sure it's XSS safe
dnr-rules.json: Lines 7-10
"responseHeaders": [{
"header": "content-security-policy",
"operation": "remove"
}]
Lmao
lol i don't think there's any better way to do this in tauri
the vencord extension also just removes the header
peak
should probably show an example... like even for simple shit it adds random stuff sometimes
I've also seen times where it's just a word and it adds like a million words of context to explain it better, instead of just translating it
deepl is very inconsistent from my experience and the accuracy is also sometimes lacking
If you translate a single word, translating that word as detailed as possible is a good thing
ci: update GitHub Actions workflow for build process
- Adjusted paths to use double quotes for consistency.
- Added a step to set up QEMU for multi-platform builds.
- Specified platforms for Docker build to support both amd64 and arm64 architectures.
open pr
close pr
@austere talon you LOVE those prs right
i read "updated github actions workflows" and thought it was a spam pr
just another case of someone opening a pr on the wrong repo xd
Content
Expand #3162's PolicyMap to include https://pastebin.com/raw/, an ideal txt hosting service for CSS themes.
Request Agreement
- [x] I have read the requirements for opening an issue above
I 2nd this.
I use pastebin regularly and have used it actively for vencord themes before the whitelist got implemented. It's a good alternative to github/gitlab
Well, I would never use pastebin. I think that it's good that you can make something without creating an account on it.
we need someone to blame when someone complains about lag in #🏥-vencord-support-🏥
just blame nin0
themes
blame @austere talon for lagging the token
components.ts: Line 51
// token lagger real
Adds ArtStation CDN to the CSP policies map as a MediaSrc.
Who caaaaaares oh no the theem is logging how old your discord account is with no other identity
Absolutely
update
are you being sarcastic I can't easily tell
Yes
keylogger theme
we aren't willing to play the game of allowing a source for only a few users, reuploading to imgur/catbox takes like two seconds
Absolute meme of a change

Github gist is crazy
when holding backspace and alt-tabbing out, the isDeletePressed variable stays true, which causes messages to be deleted unintentionally on click.
this bug has happened to me like 30 times on accident and it's annoying. it’s not super frequent, but when it does happen, it’s really frustrating.
this probably impacts a lot of other users. in fact i know it impacts a few of my friends using vencord.
 => console.log(WindowStore.isFocused()))
makes me wonder if that’s why my ctrl/shift keys sometimes stick… but it’s probably unrelated
that’s also a discord issue for me rather than a vencord issue
oops :3
oops
🎊 🔥

Hi just decided to add a little version-number badge image right next to Vencord logo.
Changes by other contributors in updating the image can simply be done by editing this URL:
https://img.shields.io/badge/<hash>-<version>-green.svg
This should make it easier for package maintainers of desktop clients especially on NixOS since it seemes to be 1 version late:
https://search.nixos.org/packages?channel=25.05&from=0&size=50&sort=relevance&type=packages&query=vencordNixOS Vencord Versions
Hi just decided to add a little version-number badge image right next to Vencord logo.
Changes by other contributors in updating the image can simply be done by editing this URL:
https://img.shields.io/badge/<hash>-<version>-green.svg
This should make it easier for package maintainers of desktop clients especially on NixOS since it seemes to be 1 version late:
Hi just decided to add a little version-number badge image right next to Vencord logo.
Changes by other contributors in updating the image can simply be done by editing this URL:
https://img.shields.io/badge/<hash>-<version>-green.svg
This should make it easier for package maintainers of desktop clients especially on NixOS since it seemes to be 1 version late:
why is editing a pull request worth a webhook 
updating this should be added to the publish workflow
wait I'm sure theres an actual dynamic shield thing
it's not really useful tho
redundant information
and the version number is meaningless
easy quick glance ig but there's other places on the ui for that
yes
the version number isn't relevant
and for the hash just look at the latest hash

make the logo the vencord pink colour
the horror
🤥
you love
ew why all black
[ <:e:1263720914583949393> Removed by @crumbsniffer ]
?
[ :e: Removed by <@&1062536788184404069>rumbsniffer ]
JUST USE THR COLOIRS FROM VENCOR DOT DEV
ur soo stupdu
??
ur being mean
apologize rn or I'm not pring the mono microphone
steromic is real
sorry my little chud
dont call me a chud ur the chud
soo flip floppy
bf68a8a MessageClickActions: make delete key detection ... - xNasuni
i still doubt this is the right solution. it works fine for Discord, we're probably just using the component wrong
@austere talon i might be doing it wrong but i cant repro the single ear microphone thing
ill pr the change cause disabling the plugin did fix it for him soo idk
6130d2f QuickReply: correctly handle new messages - Vendicated
make sure ur receiver actually can hear stereo from u
try streaming this https://www.youtube.com/watch?v=YwNs1Z0qRY0
Quick sound check to make sure you are hearing left and right audio from the correct side. If you are hearing the speech from both sides, then something is mixing the audio. It could be hardware (headphones or a plug that only supports mono) or software ("mono audio" could be selected in the accessibility settings on your device, for example).
...
well the guy said it was the microphone doing it
not the stream
stereo stream def works tho
Basically the plugin stores your current reply position for up/down functionality to work
Previously it would store a simple int (index), but this meant that if someone sent a new message it would skip a message (the more new messages, the more severe)
Now it instead stores the current message id and then dynamically finds the next message
The logic for this is kinda complicated so I'll have to test this a bit more to ensure there aren't any bugs
Also renames MessageActions -> Mes...
yes ik but
make sure stereo actually works on the receiver
not all clients can receive stereo
that's why I told you to test it with streaming to make sure it actually works xD
.,
tested more and seems to work well
Toggle WebScreenShareFixes stereo streaming params if the audio stream is a screen share
discord itself already does this for the usedtx param hence the easy variable capture :3
3b26a6e undo MessageActions rename - Vendicated
not a fan of .{0,8}
.concat(b ? "0" : "1")
ulgy
not blazingly fast, please fix by rewriting in Rust
it's ulgy
imagine a Rust crate where you like define a plugin then plugin.exportTo("src/index.ts") then we'd have blazing fast plugins
did you get a lobotomy
new patch ulgy
this is easier to read imo
replace: '$&.concat($1?";stereo=1;sprop-stereo=1":"")'
actually horror
nuh uh
pure evil
dude ${+$1} is horrifying
its wonderful
stop b eing so mean to me
it's out of love
does this make you happy
EVIL
i already pushed to ur pr
look u can't even tell it isn't official discord code
im going to barf
why
you sicken me
@austere talon intentionally makes patches unreadable to keep a monopoly on vencord development
wtf is dtx anyway
sound thingy
This document defines the Real-time Transport Protocol (RTP) payload format for packetization of Opus-encoded speech and audio data necessary to integrate the codec in the most compatible way. It also provides an applicability statement for the use of Opus over RTP. Further, it describes media type registrations for the RTP payload format.
match: /"(minptime=10;useinbandfec=1;usedtx=)".concat\((\i).{0,8}\)/,
replace: "`$1${+!$2};stereo=${+$2};sprop-stereo=${+$2}`"
@austere talon im pushing
Discontinuous Transmission (DTX), where parts of the
encoded signal that correspond to periods of silence in the input
speech or audio signal are not transmitted to the receiver. A
receiver can distinguish between DTX and packet loss by looking for
gaps in the sequence number, as described by Section 4.1
no this is evil
STEREO MIC PLUGIN REAL???
unironically it is real
are u deliberately trying to make this as cursed as possible 😭

chud behaviour
despicable
dms
stay away from me
look how wonderful it is
esbuild wrote this code
i train chatgpt to write like that
i pr vencord a massive refactor to make everything clean and concise
actually horror
!0 means to return true if the value is falsy, and 0 is falsy
cause it's converting the numbers to boolean
!0 = true
!1 = false
shorter
i do this for true !!!0
js gore @opaque silo
es team: guys let's add a new typeof value that comes after u in the alphabet
the evil minify optimisation: YOU SHALL EXPLODE
it's so funny that bundlers rely on the fact that undefined is the last type in the alphabet
and minifies to >"u"
working on ES spec must be so pain
trying to add a new method to some stdlib object? well think again because insane websites write their own methods to stdlib objects and you just broke amazon
that's why some methods have weird names in js
breaking amazon sounds like a good idea
official spec gets insane names while obscure libraires get normal
iirc array.flat() was supposed to be called array.flatten() but that conflicted with a very popular library that would define its own array.flatten and it broke popular sites
so they named it flat instead
i read that in some google blog
chatgpt found it
What can SmooshGate teach us about standards development and the Web Platform? This write-up gives an overview.
the horrors of javascript
The proposal author jokingly suggested renaming flatten to smoosh to avoid the compatibility issue. The joke was not clear to everyone, some people started to incorrectly believe that the new name had already been decided, and things escalated quickly.
lmao
why are they freaking out about a method being called smoosh
webdevs hate fun
oh my god...
@austere talon YOU HATE FUN
and this is why libraries should never ever pollute globals
(unless it's a 100% standards compliant polyfill)
ironic cause the library that caused this entire dilemma was called MooTools
🐮
is this a new dc change
nah
Discord web's encoder always uses mono
even for stream audio
that patch makes it stereo
but I fucked up and it also applies to voice, not just video
that commit fixes it so it only makes video stereo
it was causing issues for some users where their voice would only be on the left side lmao
probably because feeding mono audio into stereo encoder
so it would use the mono audio as the first (left) channel
d4743f5 future proof for NoReplyMention changes - Vendicated
6d47a34 QuickReply: correctly handle new & deleted mess... - Vendicated

btw can you replace the CustomCommands plugin with something else? pretty sure it’s gone
So is PronounDB
vendicated patch
yeah isn't stereo in streams new??
swear all clients always sent mono
yeah its fairly new
@austere talon do your quick reply changes fix https://github.com/Vendicated/Vencord/issues/3289
that issue isnt real
it always handled blocked messages correctly 😭
oh
you mean without NoBlockedMessages
no it only skips it if it's hidden due to NoBlockedMessages
does discord not expand the blocked message when you create a reply?
No
insane
you will pr fix
just make it expand ig
the changes mainly address skips when a message is deleted / created
Not really.
To create one, you would need to have it expanded already
previously when you replied to smth then people sent 5 new messages
then when you pressed down it would actually go down 5 messages instead of 1
that's what the change fixes
Ah
Good
It’s working
oh my god i wrote this and then accidentally closed my browser I am so grateful that Github automatically saves your draft
@austere talon has been destroyed
surprised this hasn't been brought up more
themes with spaces have always been broken
i haven't seen a file with a space in the name since ages
me wondering why nothing is working
the perfidious malformed patch
happens whenever i reload a dev build with watch enabeld
bro didn't even test it (tbh i didnt even know that this wasn't the case either
)
(me when broken code works better
)
Updated this for present day. Would appreciate a review 
plugin which shows your most interacted users in a word cloud or whatever you call it
discord has two stores for affinities, i just added an option to switch between them (will change if needed), i dont think v1 is used anymore though as v2 is only updated on my alt and v1 completely empty
also has a count option
the way i calculate affinity is very close to discord i think, when creating one for v1 and v2 they're close, but not perfect
i thought about adding more like usernames ...
Components in Pascal, everything else in camel I think
Upstream issue with jsx 
@limber skiff i'm probably doing something obviously wrong here 
this code used to work, broke when i tried it recently
thanks
i will see if I can make Discord's csp actually safe
aka removing unsafe-inline
@limber skiff I wonder if it would be feasible to eval with a script tag
so we can also remove unsafe-eval
actually i think discord depends on unsafe-eval nvm
but I will still try this
Doesn't dev companion need that
why would it?
Isn't unsafe inline eval
no
Oh
unsafe-inline is
<script>alert(1)</script>
Oh
and also ```html
<img onerror="virus()" src="fake">
So like preventing HTML injection
unsafe-eval is eval(), Function(), etc
unsafe-inline is the biggest security problem
eval soo useful tho
For what exactly
stealing tokens
yeah but maybe we can emulate it with script tags trol
anyway i think discord depends on eval lmao
script tag with nonce?
what prevents anything from doing the same then
with this only the root script needs a nonce
ah I see
basically strict-dynamic means
any script that passed csp (via nonce or hash) may create explicit child scripts without nonce and they will be allowed
but those scripts can't be parser inserted
<script nonce="awa">
// Legal
const script = document.createElement("script");
script.src = "...";
document.body.append(script);
// Illegal
const div = document.createElement("div");
div.innerHTML = "<script>..."
so it's the best of both worlds
ease of use of unsafe-inline, safety of strict csp
it's fire
doesnt seem like anything even needs unsafe-inline...
i will try just removing unsafe-inline
@austere talon you should review https://github.com/Vendicated/Vencord/pull/2938
Prob not 
also test for compatibility with mentionavatars plox
In my PR I added a function that just returns the prefix, first part and second part to be used in the different render functions, could probably just steal that
does vencord not have classnames
whar?
Probably means classnames(className, { foo: true, "has-bees": bees != 0 }) for classname props
It has classes that does that I think
is this a good time to say I just finished getting my PR for this up to date too lol. it doesn't have suffocate's emoji fix though 🤔
ah man I didn't realize discord-types was an external package
it needs to be updated for my pr .-.
I think vee made it easier for it to be updated last time it was needed so probably not a huge ask
Updated with gradient support, but this requires discord-types to be updated with the new GuildMember field:
colorStrings: {
primaryColor: string;
secondaryColor: string | undefined;
tertiaryColor: string | undefined;
};
Maybe I'm thinking of something else
idk this github only has 17 stars so I feel like im in the wrong place
only thing that shows up on google other than discord-api-types though which has a loooot more activity but doesnt seem to be the one?
Oh I was thinking about standalone-electron-types, my bad
You'll just have to type it yourself, I don't think there's really any maintained typings for discord because it just changes all the time
The api types are different
there is classNameFactory that works like that
no, it's been abandoned
the github for discord-types doesnt look like it's taking prs rn. what to do 🤔
I just put a // @ts-expect-error: line and it worked lol. is that fine or how should I handle this
(foo as any)
@fossil inlet
did you add anything more to your pr update that it didnt have originally cause part of mine was including yours
Just some Refactoring
oh you did update the unknown user patch which I accidentally removed earlier. yoink 
well I spent like the last 6 hours updating those prs so time to sleep 💤
editor's note: gradients are the devil
now supports mention avatars
somebody pressed send before it was done
do not blame others for your own shortcomings
me when i can send a message while things are still uploading
github bad ux...
:)
insanity how did 3 million webpack finds break
Wdym 
lmao wtf was that
so good #1337479880849362994 message
sorry i bit the wires a bit
@inland fable could you send some of those POCs because i would actually really like how you can even achieve that with CSS, i really wonder about what tech could be used in an expected way (or was designed in a way that somehow can lead to that kind of thing)
Here
4 first digits i think
NOt sure if the classes are updated
eh repeat but with every letter and the chat input
wait what
Happy birthday to https://github.com/Vendicated/Vencord/pull/2570
am I insane or could this simply be every 2 digit number combo and it'd send every digit of the id then you could reconstruct the possible ids on the backend
erm wdym
there's no wildcard character or anything
you can match x first or x last (or both)
it does get unbearable laggy at some point too
oh I see
maybe it'd match from avatar hash too like that
but maybe not a problem maybe you're right
like you select for [src^="https://cdn.discordapp.com/avatars/][src*=10] so on
if the id is 10234 the selectors for 10 02 23 34 would match
then you can reconstruct based on IP on the server
could also maybe do the same trick for other identifiers to cross reference and narrow down the reconstructed possibilities
Surely you wouldn't know the order of the two digit combinations though
They'd just be in the order of the rules wouldn't they?
well if you get 10 02 23 34 rules returned they can only fit together one way
Sure but something like 430184 = 01 30 43 18 84
Could be 184301
I just woke up so that might be wrong but you get the idea
could also match for /1
so you know the starting digit
same for the end
I'm sure there's a bazillion ways to narrow down the order
anyway CSP stops this now I think
actually no because *.github.io is white listed
lol
static site who cares
aight
sorry to bother, but is this responsible for re-patching discord after updating? (specifically after system package update on linux)
3f52f04 whitelist localhost and drop media-src (audio &... - Vendicated
e81b614 show notice if user uses https://imgur.com domain - Vendicated
Incomplete URL substring sanitization
'https://imgur.com' can be anywhere in the URL, and arbitrary hosts may come before or after it.
explode
i love commit messages
Me when "misc changes"
vencord will use conventional commits inshallah
doesn't matter when it all gets squashed on merge
it's feature branch buddy
i have a solution for you
feel free to copy my strategy
@placid hinge can you test Vendicated/Vencord#3476 with your custom cloud sync server? just with your existing config
removeOverride: (url: string) => invoke<boolean>(IpcEvents.CSP_REMOVE_OVERRIDE, url),
Pull Request Overview
This PR introduces functionality to let users manually whitelist domains for theme integration by adding CSP checks and override mechanisms.
- Introduces CSP validation checks before performing cloud settings requests and data erasure.
- Implements CSP override handling via new IPC handlers and custom settings in native settings.
- Updates CSP policies and error handling in the settings UI to support domain whitelisting.
Reviewed Changes
Copilot reviewed ...
The condition checks if the domain exists in NativeSettings.store, but the deletion targets NativeSettings.store.customCspRules. Update the check to 'if (domain in NativeSettings.store.customCspRules)' to ensure consistency.
if ((domain in NativeSettings.store.customCspRules)) {
[nitpick] Since direct Imgur links should start with 'https://i.imgur.com/', consider checking for this pattern instead to avoid mistakenly disabling the allow action for correctly formatted URLs.
<Button color={Button.Colors.PRIMARY} onClick={() => allowUrl(url)} disabled={!url.startsWith("https://i.imgur.com/")}>
HOLY SHIT TRUE
lmaooo
actually I think you should do the other too
nah the code is right
not because of the reason it explained
but its more clear
it shows what the expected url is
I know
oh wait
using !url.startsWith("https://i.imgur.com/") its more clear
it will disable anything but i.imgur.com
like if you try to load banana.com
yeye
I thought that code was specific to imgur
it didnt know it can be anything
actually solid suggestions
time to make copilot review all prs
vencord 2 coming soon, fully vibecoded
Pull Request Overview
This PR enables users to manually whitelist domains for themes and ensures cloud sync operations respect CSP rules by integrating an override request flow.
- Introduces
checkCloudUrlCspin cloud utilities and guards network calls. - Adds native IPC handlers and a CSP manager to store and apply custom CSP rules.
- Updates the Themes settings UI to list blocked resources and allow domains.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pu...
[nitpick] The inner <div> has a redundant key prop. The outer wrapper already uses key={url}, so you can remove this one to avoid confusion.
<div className="vc-settings-csp-row">
true again...
why are there so many keys
am i okay
(it's cause i refactored a lot of times, all of these used to be the top level element at one point)
it likes my code now 😊
Pull Request Overview
This PR enables users to manually whitelist domains for theme assets by integrating CSP checks into cloud sync, adding IPC handlers for overrides, and updating both backend and UI to manage blocked resources.
- Add
checkCloudUrlCspguard and new IPC events to settings sync and cloud actions - Implement native CSP override logic (main/csp) and persist custom rules
- Extend Settings UI (ThemesTab & CloudTab) with blocked-resource lists, allow buttons, and relate...
[nitpick] Silently returning on CSP failure may confuse users and callers. Consider notifying the user or throwing an error to indicate the operation was blocked.
if (!await checkCloudUrlCsp()) {
showNotification({
title: "Cloud Settings",
body: "Operation blocked due to Content Security Policy restrictions.",
color: "var(--red-360)"
});
return;
}
Wildcard entries in CspPolicies (e.g., *.github.io) won’t match when looking up by exact hostname. Implement pattern matching or normalize domains to cover wildcard rules.
The original policy allowed media-src for Imgur, but it’s now removed. If themes load GIFs or videos, you’ll need to include media-src directive in this policy.
"i.imgur.com": [...ImageSrc, "media-src"], // Imgur, used by some themes
NEVERMIND
even this is true 😭 but i am aware and decided earlier that i would just not support those cases
i considered this but they already got the popup asking them for access that they cancelled/denied so I decided it would be redundant to show an error
Not sure honestly if we should still show a notification
True but I decided it was not worth it to implement this. But it should either be implemented or noted in jsdoc (or maybe an error could be thrown)
Adds soundboard sound cloning functionality to the existing ExpressionCloner plugin, allowing users to copy soundboard sounds between Discord servers.
How it works
- User right-clicks any soundboard sound
- Selects "Clone Sound" from context menu
- Chooses target server from modal dialog
- Sound is fetched, processed, and uploaded to selected server
- User receives confirmation notification
Technical Implementation
- Fetches audio files from Discord CDN
- Converts to b...
ai 😭
does it work tho
The return in the catch is returning a string and not a fragment, and this is true in the current revision...not sure if that matters or not
idk why you're replying to that ancient thing but i did clean it up a bit
actually nvm they're all strings when disregarding the errorboundary my badddddd
idk
i was scrolling to find something lollll
this is what i do now

conclusion, I am ultra dumb
was referring to #👾-core-development message
Content
I should be the one who chooses whether to use a whitelist on my CSS or not. It's my account, and thus I'm the one who should choose the "security" measures.
Why don't you upload your resources to GitHub?
- Because I can't upload anything I want to GitHub, depending on what it is, the repository might get taken down.
- I'm not creating a repository to hold random files. GitHub is not meant as a file upload service.
And why don't you use Imgur?
- It's not as reliable as t...
"might get taken down"
Theres an ongoing pull request that adds a whitelist for CSP. This allows users to trust URLs (similar to Discords trust system) in which allows you to use custom domains for your CSS. Just a reminder, this was only originally added to follow basic security practices and nothing more.
So many people seem to think this is specifically meant to stop unwanted css
I get that themes are what's mostly affected but still
Previously a plugin with settings that have hidden set to true would still show the plugin cog icon instead of the info icon.
This PR adds a check to make sure there is a visible setting before showing the cog icon.
Before:
After:
 in which allows you to use custom domains for your CSS. Just a reminder, this was only originally added to follow basic security practices and nothing more.
Ah okay, I wasn't aware of that PR since no one commented about it in the other issues (#3467, #3462) (and I will admit that I also didn't check b...
this might just be me but maybe this should be reused instead of copypasted twice
no reason to reuse it because its only used in exactly 2 places, if it was actually used more than twice id think about reusing it but that just makes the pr more complicated than it needs to be
a plugin to change what you see in the active now section
it filters based on user or servers what you in black list or whitelist mode
nice ai
helper functions 
thanks
np
why do people add themselves to the very top of the devs constant
600 lines too far to scroll
That’s what the ai does

because it's easier
because I'm more important than V
more important than who ?
🐝
Ah yes I love being too egoistic to either scroll or collapse -> focus line after - > uncollapse 
I've had this plugin on a dev instance and I haven't encountered any issues so far.
Perhaps the only possible improvement would be to add custom formats for unix timestamp formats. For example adding :ss to <t:xxx:t> (from HH:mm to HH:mm:ss).
it's not egoism, it's lazyness
The popup is fine. it will also be asked for access everytime it's needed
Isn't it more appropriate to use an enum instead of magic strings?
I think the client should prompt you fully restart
Isn't nativeSettins already NativeSettings?
you are indeed blind :P
old code
eh I wanna use enums less
theres little need
ts union types do essentially the same thing as a const enum
how else
Hey, Giorgio from Kagi here :) - Thank you for bringing Kagi Translate support to Vencord.
I see you are using an hardcoded language list - if you'd like, you can use this API endpoint (https://translate.kagi.com/api/list-languages) instead, which returns an up-to-date list of our supported languages. Using something not in the list could still work (e.g. translating to morse code) and will be processed, it's just not officially tested/supported.
Also, proofread as a target language is ...
jumpscare
okay that was unexpected
thankfully it isn't abusing an api
imagine if it was
lmfao
idk seems like more work for 0 gain?
are u saying not to add the extra notification?
so.. would it be better to fetch the language list on plugin startup, or should I keep it hardcoded in a constant and instead just add the comment so it can be easily updated later? @austere talon
I feel like the latter would be preferred for fast startups no?
fetch it on demand
and then what if the api doesn't respond the second you hit it to fetch the languages..?
wouldn't that break everything
wdym
ye im saying it's fine if the user declines to not say anything
if you fetch the languages when the plugin starts, but the api doesn't respond so you don't have a languages list
wouldn't that fuck with something
or am I misunderstanding the "fetch it on demand"
just check
add appropriate handling
check the http status code and if it fails...?
idk what the desired way to handle that would be
the desired way is to handle exceptions gracefully
like rn if you have it configured to use deepl but your token isnt valid, it will fall back to google
47856a2 Updater: fix network errors triggering popups (... - Vendicated
4436e6d Fix missing background on notifications (#3386) - VanillaSixtySix
5f21eaa bump to v1.12.3 - Vendicated
3a2a16a whitelist tenor and pinterest for use in themes - Vendicated
bb106b7 whitelist catbox for use in themes - Vendicated
vtest dev2
Now testing! 
OverrideForumDefaults (took 7.2ms):
ID: 131704
Match: ```
/getDefaultSortOrder(){/
Seems like everything is working fine (for now) 
Hey, Giorgio from Kagi here :) - Thank you for bringing Kagi Translate support to Vencord.
I see you are using an hardcoded language list - if you'd like, you can use this API endpoint (https://translate.kagi.com/api/list-languages) instead, which returns an up-to-date list of our supported languages. Using something not in the list could still work (e.g. translating to morse code) and will be processed, it's just not officially tested/supported. Also,
proofreadas a target languag...
why no workie
I think they have duplicate code and changed the location
of course
vtest dev2
Now testing! 
OverrideForumDefaults (took 8.7ms):
ID: 131704
Match: ```
/getDefaultSortOrder(){/
Seems like everything is working fine (for now) 
how was it like before?
besides the obvious answer "with a gif", of course
What of instead of removing the plugin, you make a plugin that adds the gif back*(customize ofc)* 
the only reason i didnt was cause u cant do it with css
insert it can be done with css gif
because the popout window does not have unique enough classes or for some other reasons? because I just recreated it from scratch and it seems to work quite well
well yeah from scratch
I'll send the code on #🎨-theme-development, it's not that difficult tbh
i added restart prompt @limber skiff
should the cloud sync one also do it?
yeah i shall
could make it a util but eh
better to duplicate a few lines of code than have 3 billion niche utils
should we merge the whitelist pr
can you check my latest pr its a two (2) line code change
please no more dev force push 😭
it messes up pr order
it updates all prs

tbh more of a github issue 
alright
😭
the main reason I didn't do that was cause of the time complexity
the plugin page already has ever so slight lag when first loading
the more checks we add (and checking every plugin's settings is like 500 checks probably) the slower it will get
you could figure out how to use discord lazy scroller but meh
nah
The HTTP Content-Security-Policy (CSP) media-src directive specifies valid sources for loading media using the <audio> and <video> elements.
we dont need that
Move this to a separate function so it's organized like the rest
Should make a isImgurHtlmlDomain function and use it on this and also on the disabled prop
alr
this one you can just make it inside the component function
undefined && thing
ternary would be wonderful here
sometimes code like that isn't so obvious
it's fine
(esbuild will do that anyway)

function Mn(t, e, r) {
try {
let n = new URL(e).hostname,
i = Ke[n] ?? L.store.customCspRules[n];
return i ? r.every((o) => i.includes(o)) : !1;
} catch {
return !1;
}
}
this is what esbuild turns it into (formatted with prettier)
the bundler is the hubris of man
eh i like the pattern of
const thing = ...;
if (!thing) return;
doSomethingWith(thing);
it's clean and logical
okay but in that case youre just returning a single line do something with thing
doesnt matter anyway and your mind is corrupt 🥰
gotta love removing a line in a suggestion
