savvywolf
@savvywolf@pawb.social
Hello there!
I’m also @savvywolf@mastodon.scot , and I have a website at www.savagewolf.org .
- Comment on In light of changes coming to discord: Sharkord 1 week ago:
github.com/Sharkord/sharkord/issues/86 This one seems pretty bad.
- Comment on GitHub - spacebarchat/spacebarchat: 📬 Spacebar is a free open source selfhostable discord compatible communication platform 1 week ago:
Why would one use this rather than just using something like Matrix or self-hosted Stoat? I’m not sure what it being “Discord compatible” really gets this project. Bot compatibility is nice, but aren’t most Discord bots closed source anyway?
- Comment on Non-US cloud storage for backup? 1 week ago:
I’ve been using Hetzner boxes for my backups, although I did need to send them a copy of my id, which may or may not fit the paranoia thing.
Of course, encryption is always worth it.
- Comment on Rebranding our open-source Selfhosted social project to Bitsocial 3 weeks ago:
Why not post here when everything is all ready? Fragmenting your big marketing push is just going to hurt you.
- Comment on Rebranding our open-source Selfhosted social project to Bitsocial 3 weeks ago:
Honest comment: Bitsocial sounds an awful lot like Truth Social.
If that comparison is unintentional and not desired, maybe reconsider the name.
If that is intentional, we are probably not your target audience.
- Comment on Why isn't using a key file the most common way to log into self-hosted servers? 4 weeks ago:
You can (and should) just use a password manager to generate and store ~64 byte keys which have roughly the same amount of security.
- Comment on How are people discovering random subdomains on my server? 5 weeks ago:
If you do a port scan on your box, what services are running? Maybe something like email or diagnostics is exposed to the internet and announcing subdomains?
- Comment on Here is a more polished release of nanogram. Fully compatible on raspberry pi now. 1 month ago:
Two factor authentication won’t help here. You have to build your app with the assumption that any attacker has a valid login and credentials and therefore restrict them to only information they have permission to see.
File uploads are encrypted in transit from the client to the server but not encrypted on the server.
Usually when people talk about e2e encrypted messaging they mean that everything is encrypted. That includes images and text content. The server should not be able to read any contents of any message sent through it.
Again this is a design choice I don’t want gifs.
Why? Sending memes is a core part of any social media experience.
There are filetype checks on line 350 of the app.
Line 350 in both files doesn’t seem to contain any filetype checks. I assume you mean
file.content_type. That may not be accurate to the actual file uploaded; it can be spoofed.Yes deleting is atomic.
# Delete the associated message if it exists if chat_file.message_id: msg = db.get(Message, chat_file.message_id) if msg: db.delete(msg) ---> Here # Delete file from disk file_path = os.path.join(CHAT_FILES_DIR, file_uuid) if os.path.exists(file_path): os.remove(file_path)
If the application crashes/closes at the indicated point, then you will delete the message from the database but still have the image on the server. If this is an image served from
/img/whatever, it would have no checks beyond a login check. - Comment on Here is a more polished release of nanogram. Fully compatible on raspberry pi now. 1 month ago:
to the extent Tor is secure
Tor doesn’t automatically secure your app. If your social media instance has 1000 users on it, and one user gets compromised, then the other 999 users shouldn’t have any interactions outside of that user leaked.
web crypto can be utilized for group and 1-1s for an additional layer of encryption
Are file uploads encrypted?
How would you ever discover a filename?
Maybe you have a data leak. Maybe they send the filename in plaintext somewhere. Maybe they take advantage of the fact that UUIDs might be deterministic. But if I may flip the question… Why does an inaccessible post even need to return 403 anyway? It just functions as a big footgun that may cause any other exploits to behave worse.
Even if you have the correct link, if those two conditions arnt satisfied you will not be able to view.
But you can determine its existence or not through the status code.
This was a design choice to have consistency in filetypes. What’s the downside? All browsers will support displaying a jpg.
Gifs will lose any animation, pngs will lose quality. Also, as far as I can tell, there’s nothing stopping a malicious user uploading a non-image file.
Which part are you talking about?
There are two steps to making a post: Upload and store the image and add the post to the database. There’s also similar steps to deleting a post: Removing the image upload and removing the post from the database. Are both these operations atomic?
Everything except the login page, registration link will behind these two checks see (def login) where the @loginrequired logic is defined for each of the app routes.
It’s not that hard for a sufficiently motivated adversary to get an account on a sufficiently large instance. You need to ensure that one user account being compromised doesn’t result in information leakage from unrelated accounts.
This discussion stems from issues I found in just one function. You’re making a product which requires a very high level of security. You need to understand how to write secure code, and your LLM won’t be able to do it for you.
I don’t want to discourage you from programming in general, but making a very secure social media site is a rather complex undertaking for someone new to programming.
- Comment on Here is a more polished release of nanogram. Fully compatible on raspberry pi now. 1 month ago:
-
You list “Activist/journalist secure communication” as a use case. Not all countries have freedom of press.
-
Looks like you name images based on a random uuid, so that should protect against filename attacks. But if you do have a filename you can tell whether the image has been an image or not.
Also, looks like all uploads are converted to jpg, regardless as to whether the original image was a jpg (or even an image) or not. Don’t do that.
- Can you point to where in code this invariant is enforced?
-
- Comment on Here is a more polished release of nanogram. Fully compatible on raspberry pi now. 1 month ago:
Had a quick skim and found this little guy:
# ---------- Protected media route ---------- @app.route('/img/<path:name>') @login_required def media(name): db = SessionLocal() try: me = current_user(db) # Find the post with this image post = db.query(Post).filter_by(image_path=name).first() if post: # Check visibility can_view = post.user_id == me.id or db.query(UserVisibility).filter_by( owner_id=post.user_id, viewer_id=me.id ).first() is not None if not can_view: abort(403) return send_from_directory(UPLOAD_DIR, os.path.basename(name)) finally: db.close()
I’ve not read through everything, but there are some security concerns that jump out to me from just this function. Hopefully you can enlighten me on them.
Firstly, what is stopping a logged in user from accessing any image that, for whatever reason, doesn’t have an associated post for it?
Secondly, the return codes for “the image doesn’t exist” (404) and “the image exists but you can’t access it” (403) look to be different. This means that a logged in user can check whether a given filename (e.g. “epstien_and_trump_cuddling.jpg”) has been uploaded or not by any user.
Both of these look to be pretty bad security issues, especially for a project touting its ability to protect from nationstates. Am I missing something?
- Comment on Released: CyberTools Admin 1.5.0 — Backup/Restore Automation for CyberPanel & Linux Servers 2 months ago:
There’s tons of backup solutions out there. Why should selfhosters buy a proprietary one?
- Comment on Are there any games you don't play as it was intended to be played? If so, what game and how? 4 months ago:
Last time I used the recomp, which has the randomiser built in. The game looks and runs much nicer through it.
- Comment on Are there any games you don't play as it was intended to be played? If so, what game and how? 4 months ago:
I grew up with Zelda Ocarina of Time, so now every time I feel like playing it I use a randomiser to put all the items in random locations. It makes every playthrough more unique and interesting.
- Comment on How do you secure your home lab? Like, physically? From thieves? 4 months ago:
Encryption and offsite backups. If someone nicks it then they don’t get any private information. And with backups it’s easy enough to just push the data onto a new device.
- Comment on What's your favourite menu music in a game? 4 months ago:
www.youtube.com/watch?v=yOUUS6JIRQ0
Have a very nostalgic theme for a very specific group of people. :P
- Comment on Why doesn't Ghost v6 include Fediverse commenting ? 4 months ago:
So, to address the elephant in the room… Why does commenting on a blog post need any kind of account? Why not have fields for “name” and “comment body” and use capcha and/or manual approval to guard against spam?
Like, why does everything need to be tied to an account nowadays?
- Comment on Those who are hosting on bare metal: What is stopping you from using Containers or VM's? What are you self hosting? 4 months ago:
I’ve always done things bare metal since starting the selfhosting stuff before containers were common. I’ve recently switched to NixOS on my server, which also solves the dependency hell issue that containers are supposed to solve.
- Comment on Backup/Server Options - is Syncthing / Nextcloud really the go? 5 months ago:
Syncing software is not a backup. I’ve had cases where they get confused and end up deleting data. They’ll also blindly copy over corrupted or randomwared files.
- Comment on Mario 64 wastes SO MUCH MEMORY | Kaze Emanuar 5 months ago:
Imagine falling into lava and hearing “It’s-a okay Kühlschrank, we-a all make-a mistakes”.
- Comment on [deleted] 5 months ago:
The problem is checking for malware: It’s very hard to do that and a lot of malware has evolved attempts to avoid detection.
- Comment on Your favourite piece of selfhosting - Part 1 - Operating System 6 months ago:
I’ve been using NixOS on my server. Having all the server’s config in one place gives me peace of mind that the server is running exactly what I tell it to and I can rebuild it from scratch in an afternoon.
I don’t use it on my personal machine because the lack of fhs feels like it’d be a problem, but when selfhosting most things are popular enough to have a module already.
- Comment on Simplifying Crypto Parties 6 months ago:
Would it? I would assume a “confirmed human” Fedi account could be worth $5-20. If you live close enough to the library, it’s like 5 mins to pop in, drop off the piece of paper and go about your day. Double if you can sneak in two pieces of paper.
- Comment on Simplifying Crypto Parties 6 months ago:
What’s stopping someone making a new account every month this way or going to many different libraries and then just selling the account to bot farm operators?
- Comment on Simplifying Crypto Parties 6 months ago:
How does the library confirm that the account name is connected to an actual person?
- Comment on How to combat large amounts of Ai scrapers 7 months ago:
It’ll still slow them down and reduce load on your server. I also think many of these crawlers focus on volume; time spent computing the hash is time not spent crawling someone else’s site.
- Comment on [deleted] 7 months ago:
Most registrars have some form of whois protection now, so the only people who can easily see it are the registars themselves (and the government that controls them).
Assuming you’re paying for a domain using real money, they’ll need your information on file as part of the online payment anyway, so using a fake id doesn’t really hide anything from them.
- Comment on How to combat large amounts of Ai scrapers 7 months ago:
I’ve seen people suggesting and using Anubis, haven’t used it myself though.
- Comment on PewDiePie: I'm DONE with Google 7 months ago:
If it stays up, it’s certainly going to be interesting seeing the difference in view counts between it and his other videos.
- Comment on What’s the best, reasonably priced, handheld device I can buy to play GameCube games? 7 months ago:
Probably a Steam deck; I’ve used mine to play Gamecube games and it’s worked fine.