Questions tagged [security]

Computer security is security applied to computing devices such as computers and smartphones, as well as to both private and public computer networks, including the whole Internet.

Filter by
Sorted by
Tagged with
0 votes
0 answers
64 views

Vanilla JavaScript Email Obfuscation Defenses Against Bots [closed]

I have been using Cloudflare's Email Obfuscation for a while now but the JavaScript file loaded was causing a pretty substantial increases in Total Blocking Time and Time to Interactive. Then after ...
user avatar
  • 235
2 votes
0 answers
103 views

Simple websocket chat app

I'm coding a simple websocket chat app. I was wondering if my code is secure and efficient. I also have a question about the way how I'm sending objects and then checking the type, is there anything ...
user avatar
  • 21
2 votes
0 answers
73 views

Rijndael Cipher in C++ (128bit AES)

I am a hobbyist and do not work in the industry but do have an interest in programming an cryptography. I decided to have a go at writing a 128bit implementation of AES in C++. This is my first ever C+...
user avatar
2 votes
0 answers
29 views

Weighted Union-Find class

For a final project I used a weighted union-find and decided to implement it in Python. I wrote it to be as general as possible so it's very portable. I do plan on looking into path compression to ...
user avatar
4 votes
2 answers
327 views

Bash-based Port scanner (/dev/tcp)

This question is ideal in my case: Ludisposed's python-scapy-tcp-port-scan-of-subnet - At codereview stackexchange But this is not Scapy; nor Python(it might get used in the future though but that is ...
user avatar
0 votes
1 answer
134 views

Is this session manager secure?

I'm looking for best practices for writing secure session managers. I'm making a table for the authorization token (UUID OR GUIDv4) with autoincrement, user_id, token, status (enum) then update status ...
user avatar
  • 27
0 votes
1 answer
63 views

Python: token request, SQL user fetch and API calls

I have the files as below. What I'm looking for is some feedback with regards to security, reliability, maintenance, scaling and performance. What is going on? Make a request to get a token to access ...
user avatar
  • 351
0 votes
2 answers
73 views

Security of my upload script #2

I recently asked this question and got a response. I made improvements, it now checks if the file is an image and/or used UUID to store the images, and now I want to see if it's good or not. How ...
user avatar
1 vote
1 answer
128 views

Boolean expression evaluation for user input using evil eval

The following code is a module that evaluates boolean expressions, which are entered through an unauthorized web API. The exposed function of the library being used is ...
user avatar
0 votes
1 answer
49 views

How do I make my program that creates RSA keys and encrypts and decrypts a file more secure

...
user avatar
3 votes
2 answers
153 views

Serve rescaled jpg images on demand with myphoto!500.jpg syntax (here 500px-width rescaled)

On web pages, obviously we cannot serve large photos (e.g. 4000x4000px) and just let CSS do the resizing: it would be too slow for end users and too bandwidth-consuming for the server. So it's ...
user avatar
  • 245
1 vote
1 answer
67 views

Protect Routes/Page with NextJS [closed]

I have a simple project that I built that protects the routes/pages of the website by using the if and else statement and putting each page with a function ...
user avatar
3 votes
0 answers
105 views

Bash script for pull-mode backups via restic's rest-server

I wrote the following Bash scripts to make pull-mode backups with restic, a backup solution written in Golang, similar to Borg Backup. The main use case for this script is pulling backups into a ...
user avatar
  • 323
1 vote
1 answer
74 views

Prevent Column Name Collision

I have been working on a series of posts about a library to connect to databases but most of the scenarios I have to resort to some "JOIN" the problem arose when two or more tables had some ...
user avatar
1 vote
0 answers
31 views

Verify implementing Microsoft Graph 4.0.0 for SSO in Azure is implemented correctly

I originally posted this on SO, and I know cross-linking is generally frowned upon. But, I am not sure if this falls under question or code review because the code works where I do not know if it is ...
user avatar
  • 131
0 votes
1 answer
119 views

script to recover browser passwords

basically i am new to python lookin for any bad practices done down there in my script, any ways to shrink the code and increase efficiency ...
user avatar
  • 137
0 votes
1 answer
50 views

Simple web page to enhance browsing of IMSLP music collections

I'm building a simple webpage that allow users to find the intersection of different category lists on a wiki (imslp.org) since the site itself does not offer this functionality. I have a simple HTML ...
user avatar
  • 53
2 votes
1 answer
83 views

A simple C# script that exploits PHP command injections

Back in 2016, I wrote a simple C# script that exploits a generic command injection vulnerability on PHP webapps, just for the sake of demonstrating that exploits can be written in .NET languages (due ...
user avatar
  • 79
0 votes
0 answers
228 views

Spring Boot API Key Filter

I tried https://stackoverflow.com/questions/48446708/securing-spring-boot-api-with-api-key-and-secret, but that didn't work for me (filter did nothing). Since I couldn't find any useful tutorial with ...
user avatar
1 vote
0 answers
25 views

Access to IIdentity outside of aspnet application

My ASP.NET application references a classlib that contains the business logic, where I need to have access to the IIdentity of the "current user". In ASP....
user avatar
  • 11
2 votes
1 answer
195 views

.Net 5.0 Get User Email From Claims

From searching online I have identified two ways to get the user email, but I don't know if either has pro's/con's beyond Option.1 being a larger number of lines of code? Option.1 I have a dedicated <...
user avatar
  • 123
4 votes
1 answer
116 views

Storing and confirming user input

I am a beginner, and I'm trying to secure a sign-login system on my website. Is my code good/enough to prevent SQL injection? THIS IS THE SIGN FILES This is the index.php that takes user input: ...
user avatar
  • 163
3 votes
1 answer
70 views

Security of the login code on the website

I wrote the code to log in php to the admin panel. Everything works as it should. But I am not sure if it is well written code and if it is safe. I care about security. I have read a lot about it but ...
user avatar
  • 31
0 votes
1 answer
50 views

Please check out my code incrementer

I recently developed code that can run as a function parameter but I'm not quite sure how vulnerable it is to hacks and/or cheats. Also, is there anything I could improve? ...
user avatar
4 votes
2 answers
942 views

Securing my password wallet

I am currently learning C++, so I made this basic password wallet for Ubuntu. Its source code is in the /opt directory and it has a symlink so i can launch it from ...
user avatar
5 votes
1 answer
117 views

Security of CS50 Calculator code (eval)

This is my first question on Code Review, so please let me know if I botched anything. After working for quite a while on my CS50 calculator, it has finally reached the point where I am completely ...
user avatar
  • 143
2 votes
1 answer
46 views

Client-server application for logging running processes

My first client-server application. It's a simple Python script that gets a list of running processes from Server_1 and writes it to a datetime-named file on ...
user avatar
  • 123
8 votes
3 answers
232 views

Is my website's PHP registration system secure?

I would like to know if my registration system is secure. I'm not sure if it is secure, as I'm new in development, and I'm afraid that the system is flawed Also, I'm not experienced in object oriented ...
user avatar
  • 193
5 votes
3 answers
264 views

Class showing a format similar to var_dump RC5 Version

Some methods of this library require some improvements (see this description): In the constructor I am trying to create the possibility that the user modifies the ...
user avatar
2 votes
2 answers
103 views

Encrypting/decrypting messages in java

I am trying to implement message encryption/decryption with password in java. Here is the code I'm using: ...
user avatar
6 votes
2 answers
153 views

Password reset system in PHP

What I try to achieve I need to create a secure forgot password reset system. I am especially worrying about the security of this code and how to further improve it. Here's my code: ...
user avatar
0 votes
1 answer
309 views

Recieving an XSS Injection: <script>alert('xssvuln');</script>

I would very much appreciate it if someone could review the php script below for any security risks. I have a live website using shared hosting. There's a page that accepts text submissions from users....
user avatar
2 votes
2 answers
64 views

RSA wrapper python

...
user avatar
  • 454
4 votes
1 answer
3k views

Rate Limiter implementation in Java

I have been working on implementing rate limiter in Java. Following is my approach. I have used 'sliding window with counters' technique to implement this rate limiter. What I do is instead of rate ...
user avatar
6 votes
1 answer
98 views

Basic login system with 2 factor authentication

What I try to achieve I need to create a administration-panel for a website. Therefore, I need a possibility to protect the content of the panel via a password. The functionality doesn't have to be ...
user avatar
5 votes
1 answer
394 views

HSTS Recommendations in .htaccess

Please see my previous post in the below hyperlink I've updated my .htaccess file to account for an HSTS, along with many of the recommended changes. See the ...
user avatar
4 votes
2 answers
174 views

Angular Frontend login logic

This is a follow-up to this question Node.js backend login logic. I wrote the following login Angular frontend logic for my Node.js Backend (see the previous question above). Is it any good in terms ...
user avatar
  • 195
9 votes
1 answer
251 views

Node.js backend login logic

So I wrote a rather primitive login logic in Node.js, which authenticates the user and handles JWT. Is it any good in terms of security, efficiency, building, async/sync, logging. SECURITY is my main ...
user avatar
  • 195
4 votes
1 answer
180 views

.htaccess Recommendations

I have a personal website that's used primarily for fun. I upload images, videos and text that I want to share. An HTML submission form accepts questions and string submissions from users, which uses ...
user avatar
3 votes
1 answer
127 views

Simple C++ Hash function library

I had created hash function library (MD5, MD4, SHA256, ...
user avatar
  • 95
3 votes
1 answer
429 views

Sanitizing user form input in php

Security threats in mind: SQL Injections!!! --- Solutions: Prepared Statements (PDO) and including $bpdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); in ...
user avatar
6 votes
1 answer
167 views

binary data shell echo generator

edit: here is a cleaned-up version incorporating most (but not all) feedback, thanks guys; https://gist.github.com/divinity76/79efd7b8c0d7849b956cd194659c98e5 edit2, 2021-07-16: found a bug (possible ...
user avatar
2 votes
2 answers
159 views

Secure file upload for PDF only

I am trying to create a secure file upload using PHP 7+ where I only allow PDF files. I found a lot of posts on this topic on different websites but couldn't find a complete solution that ensures that ...
user avatar
  • 223
3 votes
1 answer
455 views

Very simple encryption API

I need an encryption system with a super simple API. I'd prefer something as simple as the following. The output should also be browser-friendly and ideally url-friendly. ...
user avatar
3 votes
2 answers
199 views

Contact form with spam-prevention - follow-up

Background The basics of this project are already covered here. I received the suggestions to: not create the exercise with JavaScript. use pictures instead of plaintext. I tried to implement the ...
user avatar
1 vote
1 answer
124 views

In Spring framework, should the controller let the client know that something went wrong by returning a response entity with the proper error code?

Category Service: ...
user avatar
1 vote
0 answers
43 views

sanitize untrusted input for templates

Does this adequately sanitize untrusted input for client side frontend templating where templates are otherwise trusted? What details remain to address or need reconsidering? Please note the character ...
user avatar
  • 221
2 votes
1 answer
124 views

Bruteforcing passwords

A day ago I started a c# project where I bruteforce passwords. Passwords can be both integers and strings. In the code I check how many characters the password has. Whilst this is kinda cheating it ...
user avatar
3 votes
1 answer
151 views

Securely upload multiple image files with PHP

I am working on script to a upload image files Securely. can anyone please review my code and suggest improvements on security. ...
user avatar
  • 31
6 votes
1 answer
122 views

upload multiple images and resize

I've written PHP code to upload multiple images to a server. This function processes a maximum of 10 images at one time and if any image's width or height is larger than 2000px it will resize it. But ...
user avatar
  • 61

1
2 3 4 5
16