Jump to content

trylo

Member
  • Posts

    157
  • Joined

  • Last visited

Everything posted by trylo

  1. The invisible icon appears for a split of a second - there is no chance to click on it or pull to the right. There was a Windows update yesterday. Today I haven't noticed the appearing icon so far...
  2. Interesting. I have 2 monitors and I use 3 desktops, so maybe it is connected, although it's not happening at the moment of switching desktops.
  3. I have a pretty constant set of apps that I keep open throughout the day, but I'll try to close some to see if it's associated with one of them. For sure it's not connected with a specific action I'm doing, it seems like it's every 15 minutes or so. It's hard to say for sure as it's just a blip in my periferal vision. I'll try to record screen with Task Manager open to see if something comes up. Thank you for your tips on how to tackle this.
  4. I have noticed that from time to time there is a weird flicker on my taskbar. Very suspicious, so I turned on the screen recording to catch what is going on. What happens is it looks like there is an app opening for just a split of a second and then it closes down. Of course, I'm afraid of some malicious software running on my computer. I don't run any pirated software on my machine, so I'm unsure where it could come from. Is there any way to find out what app does that? Thank you for your help in advance!
  5. I switched to mysql2 and logged as much as possible and found out that it was actually bcrypt that was crashing the backend. I switched to bcryptjs and it works now. Thanks.
  6. Hi! I'm a hobbyist programmer. I'm trying to write a Vue Web App just for fun, but I want to make it secure. I'm hosting it on my Unraid machine. I have separate containers for the frontend and for the backend. I have a container with Nginx Proxy Manager that is giving me reverse proxy for my other things (like Home Assistant or Nextcloud) and I want to use it to for my little Web App. Right now I'm struggling with something that probably most of you will consider silly: user registration. I have the frontend and the backend setup and it works... until I want to implement CORS. When I do that and I try to register a user - my backend container crashes and the webbrowser consol gives me an error saying: Access to XMLHttpRequest at 'https://db.domain.com/register' from origin 'https://app.domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I have no idea what is wrong. It looks like maybe Nginx Proxy Manager is stripping the header? But I don't know how to fix this. Can anyone help me troubleshooti this? This is my backend code: import dotenv from 'dotenv'; import nodemailer from 'nodemailer'; import crypto from 'crypto'; import express from 'express'; import bodyParser from 'body-parser'; import cookieParser from 'cookie-parser'; import mysql from 'mysql'; import cors from 'cors'; import bcrypt from 'bcrypt'; import jwt from 'jsonwebtoken'; import { body, validationResult } from 'express-validator'; import helmet from 'helmet'; import cron from 'node-cron'; import rateLimit from 'express-rate-limit'; process.on('uncaughtException', (error) => { console.error('Uncaught Exception:', error); }); process.on('unhandledRejection', (error) => { console.error('Unhandled Promise Rejection:', error); }); dotenv.config({ path: process.env.NODE_ENV === 'production' ? '.env.production' : '.env.development' }); const app = express(); const corsOptions = { origin: ['https://app.domain.com', 'https://db.domain.com'], credentials: true, methods: 'GET,HEAD,PUT,PATCH,POST,', allowedHeaders: 'Content-Type,Authorization' }; app.use(cors(corsOptions)); app.use(helmet()); app.use(bodyParser.json()); app.use(cookieParser()); app.set('trust proxy', 1); // Configure MariaDB connection pool const pool = mysql.createPool({ connectionLimit: 10, // Optional: adjust the number of connections in the pool host: process.env.DB_HOST, port: process.env.DB_PORT, user: process.env.DB_USER, password: process.env.DB_PASSWORD, database: process.env.DB_NAME }); // Test connection to MariaDB pool.getConnection((err, connection) => { if (err) { console.error('Error getting connection from pool:', err); return; } console.log('Connected to the database.'); connection.release(); // Release the connection back to the pool }); // Rate limiting const loginLimiter = rateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes window max: 5, // limit each IP to 5 login requests message: 'Zbyt wiele pr�b logowania, spr�buj ponownie za 15 minut.' }); // Configure nodemailer transporter let transporter = nodemailer.createTransport({ host: "smtpserver.com", port: 587, // Common ports are 587 (for TLS) or 465 (for SSL) secure: false, // true for 465, false for other ports auth: { user: process.env.EMAIL_USERNAME, // Your SMTP username pass: process.env.EMAIL_PASSWORD // Your SMTP password }, tls: { // Do not fail on invalid certs (if you are using self-signed certificates) rejectUnauthorized: false } }); // Registration endpoint app.post('/register', loginLimiter, [ // Validation rules body('username', 'Nieprawidlowy adres email').isEmail(), body('password', 'Haslo musi miec minimum 9 znak�w').isLength({ min: 9 }), ], async (req, res) => { // Check for validation errors const errors = validationResult(req); if (!errors.isEmpty()) { return res.status(400).json({ errors: errors.array() }); } const { username, password } = req.body; res.setHeader('Access-Control-Allow-Origin', 'https://app.domain.com'); res.setHeader('Access-Control-Allow-Methods', 'POST'); res.setHeader('Access-Control-Allow-Credentials', 'true'); // Check if the user already exists pool.query('SELECT * FROM users WHERE username = ?', [username], async (err, results) => { if (err) { console.error("Database query error:", err); res.status(500).send({ message: "Error checking user existence", error: err.message }); return; } if (results.length > 0) { // User already exists res.status(409).send({ message: "Adres email jest juz zarejestrowany" }); return; } // If user does not exist, continue with registration try { const hashedPassword = await bcrypt.hash(password, 10); const verificationToken = crypto.randomBytes(16).toString('hex'); const tokenExpiration = new Date(); tokenExpiration.setHours(tokenExpiration.getHours() + 9); // Save user with token in the database pool.query('INSERT INTO users (username, password, verificationToken, tokenExpiration) VALUES (?, ?, ?, ?)', [username, hashedPassword, verificationToken, tokenExpiration], (error, result) => { if (error) { console.error("Error in user registration:", error); res.status(500).send({ message: "Blad rejestracji nowego uzytkownika", error: error.message }); return; } // Send verification email const mailOptions = { from: process.env.EMAIL_USERNAME, to: username, subject: 'app - weryfikacja adres email', html: `<p>Potwierdz adres email klikajac ponizszy link: <a href="http://${req.headers.host}/verify-email?token=${verificationToken}">Potwierdzam adres email</a></p>` }; transporter.sendMail(mailOptions, function (emailError, info) { if (emailError) { console.log(emailError); res.status(500).send({ message: "Error sending verification email", error: emailError.message }); return; } else { console.log('Email sent: ' + info.response); res.status(201).send({ message: "User created. Please check your email to verify your account." }); } }); } ); } catch (error) { res.status(500).send({ message: "Error hashing password", error: error.message }); } }); }); // Function to query the database using the pool function queryDatabase(query, params, callback) { pool.getConnection((err, connection) => { if (err) { console.error('Error getting connection from pool:', err); callback(err, null); return; } connection.query(query, params, (error, results) => { connection.release(); // always release the connection back to the pool if (error) { console.error('Error executing query:', error); callback(error, null); return; } callback(null, results); }); }); } // Start server const port = process.env.PORT_BACKEND || 3000; app.listen(port, () => { console.log(`Server is running on port ${port}.`); }); console.log('VERSION: '+process.env.VERSION); console.log('Frontend URL: '+process.env.FRONTEND_URL); console.log('DB Host: '+process.env.DB_HOST); And here is my frontend call: async RegistrationNew() { const apiUrl = import.meta.env.VITE_APP_API_URL try { await axios.post( `${apiUrl}/register`, { username: this.username, password: this.password }, { withCredentials: true } ) alert('Registration successful! Please check your email to verify your account.') } catch (error) { if (error.response) { this.errorMessage = error.response.data.message || 'An error occurred during registration.' } else { this.errorMessage = 'Registration failed. Please try again.' } console.error('Registration error:', error) console.log("VERSION: "+import.meta.env.VERSION) console.log("API URL: "+import.meta.env.VITE_APP_API_URL) } }
  7. This is so much worse The temps went high really quickly and after I opened the side panel a heat wave hit me.
  8. All others to intake? Including the top mounted to the AIO radiator?
  9. Thank you for this image, it's helpful. I will add fans to the bottom and flip the back fan around and see if it helps.
  10. I will do some more testing. It may be just a coincidence, but so far I had no crashes in Half-Life Alyx and in Hogwarts Legacy as long as the side panel is off.
  11. I've run test for 1h with panel on and for 1h with panel off. CPU temp is actually slightly higher with Panel Off (Package 1C higher). GPU temps are a lot lower with Panel Off (9C GPU, 10C Memory, 10C Hot Spot). NVME that is directly under GPU is 5C cooler with Panel Off. Side note: +12V for some reason on this Motherboard has always reported wrong voltage, it's been like this since I got it 3-4 years ago. What do you folks think? Should I get a different case?
  12. Hi! I've just upgraded my system with RTX 4090. CPU: i9-9900K (cooled by Fractal Design Celsius S24 Black 2x120mm mounted to the top of the case) RAM: G.SKILL 64GB (2x32GB) 3200MHz CL16 Ripjaws V MB: Asus WS Z390 Pro Case: Fractal Design Define R6 Airflow: Intake: 2x140mm in the front & 1x 140mm in the back Out: 2x120 on the top through the CPU radiator. It seems like there is not enough airflow for 4090. Games sometimes crash. GPU is not overclocked. If I take the side panel off the GPU temps go down by 7 degrees celcius and I haven't encountered a crash with the side panel taken off. Did any of you have similar situations? Should I change my case?
  13. OK, I've found it. It was in a different place than I thought. But what's up with support not giving me this infomration? Weird... It's “Apple AQC113” I’ve found information that it is Marvell-Aquantia AQtion based NIC. So in prinicipal I agree with you on the sleep thing. I don't use sleep on my PC, but the Mac Studio is my wife's. She has her habbits and she just doesn't remember to turn it off, so if not for sleep the Mac Studio is going to be on almost 24h a day. Besides we are in 2022 and such simple things like having a computer in sleep mode shouldn't be a problem. I'd rather keep that dumb switch in between, than chase my wife each time to turn her computer off. Regarding the network settings - I've set up everything manually (IP, DNS, 1000baseT, full duplex, no flow control and no EEE). For the application that routes traffic - this has been ruled out, as I tested with a fresh "clean user" and also in safe mode.
  14. I had some issues with ethernet network performance. Basically each time Mac Studio (connected to 1Gbps ethernet to UDM SE) goes to sleep all other devices on the network have upload limit of 8-10Mbps. If it's on or off everything is fine, but as soon as it goes to sleep the port in UDM SE it is connected to via ethernet goes in "FE" mode and all devices on the network have a limit of upload at around 8-10Mbps. I've switched the network settings to manual and set it to full duplex 1Gbps without flow control and without EEE. That didn't help. I've tried creating a new "clean" user on that Mac and putting the computer to sleep as well as putting it to sleep in Safe boot mode - the result is the same. Regardless of the user or the safe boot mode as soon as the Mac Studio goes to sleep it's limiting the performance of the whole network. Just now I have found a workaround: instead of connecting the Mac Studio directly to the UDM SE, I've placed a "dumb" switch I had laying around. So now I have the Mac Studio connected to the switch and the switch is connected to the UDM SE and it seems like the problem is gone. I've leaft the Mac Studio asleep over the night and made a speed test go every 15 minutes to confirm it. And it is working fine. I still would like to find out a proper solution to this problem. I contacted Ubiquiti and they are asking for NIC model and driver version. I can't find it in the system information. I called Apple support and they told me that this is not a publicly accesible information (WTF?). Does any of you have an idea how to solve the problem or to find out NIC model?
  15. I have the latest firmware. I did factory reset and it made no change. I spent 2 hours setting up everything from scratch just to have it crap out after 4 days. I'm just going to sell it, maybe someone else way of using it won't trigger the problem. I've ordered UDM-SE with an AP, hopefully this will give me smooth experience.
  16. It's constantly running around 80°C regardless of the ambient air (which is ucually around 25°C). The fan works as I can hear it from time to time and the fact that I can find info about the temperature in the settings shows that the sensor works too.
  17. Hi! I have UDM (not Pro) that from time to time just freezes LAN ports. None of the RJ-45 connected computers (NAS, PC and a Mac) can access each other or the internet. Only WiFi devices stay connected, can access each other and the internet. I've contacted Ubiquity, but it's been 2 months, the support is taking ages and there is no clear idea what is wrong. First they told me that the unit is running to hot and I should but it closer to an AC, but it actually is close to AC and the fan is not kicking in, so the firmware must disagree that it's too hot. Now they are asking me to disconnect all devices except for NAS, but my PC has only wired ethernet, Mac can work on WiFi, but that's not ideal as we work with video so wired connection make a difference. Any ideas what I can do myself to trouble shoot it? Or maybe I should just get rid of it and buy a UDM-Pro and an access point? Or maybe use different brand for networking? Although my Home Assistant is using the Ubiquity intergration for presence detection... Any help is greatly appriciated.
  18. Thank you for your answer Eigenvektor. I was afraid it's not going to be easy. In this case I'm left with hope that Sony will include LUT support in their Imaging Edge Mobile App.
  19. Hi! I need an app that will work on the system level and change the image displayed based on a .cube file. So everything that is being displayed is converted by the .cube file. .cube file is a LUT (a look up table) that converts displayed image. ie. it changes the pixel that RGB values are 125,132,9 to 135,200,100 (just an example). It's kind of a "filter". Basically what I want to achieve is: I select a .cube file and everything that is displayed on my android device is being transformed accordingly to that file. I need it for apps that don't support LUTs. Maybe the Android OS will have to be rooted for this. I hope I was clear, if not please feel free to ask me any question. Would an app like that be possible?
  20. Zotac is not responding... I'd rather change the fans by myself. If I return the card it can take couple weeks for it to come back to me fixed, therefore I would need to buy another one for that time. Do you know what fans or where I can buy to change them myself?
  21. You are right. I ran FurMark 3 times and the noise comes up every time the fan speed exceeds 76%.
  22. Not really. Have a look at the video. It's more like weird scratching. First I thought something happened to the fans, but haven't found anything inside... Maybe it's some sort of weird coil whine, but I've never heard anything like it.
  23. Hi! I'm getting this weird noise today. I noticed it while rendering in DaVinci Resolve. It's coming from the graphics card. You can hear it well here around 0:40 https://youtu.be/WmFoxcQN0oE Should I return this card (almost 2 yo, but 5 y warranty on it)? Thank you in advance for all your help.
  24. I also have i9-9900K. I used to work with Premiere (now mostly Resolve). I was wondering the same thing, but I found some information that QuickSync doesn't make any sense in i9-9900K as the processor is so powerful that it renders faster with software encoding.
  25. It just happened again... Microsoft (R) Windows Debugger Version 10.0.19494.1001 AMD64 Copyright (c) Microsoft Corporation. All rights reserved. Loading Dump File [C:\Windows\MEMORY.DMP] Kernel Bitmap Dump File: Kernel address space is available, User address space may not be available. ************* Path validation summary ************** Response Time (ms) Location Deferred srv* Symbol search path is: srv* Executable search path is: Windows 10 Kernel Version 18362 MP (16 procs) Free x64 Product: WinNt, suite: TerminalServer SingleUserTS Built by: 18362.1.amd64fre.19h1_release.190318-1202 Machine Name: Kernel base = 0xfffff801`47c00000 PsLoadedModuleList = 0xfffff801`48048210 Debug session time: Tue Oct 22 21:11:36.485 2019 (UTC + 2:00) System Uptime: 0 days 0:22:10.252 Loading Kernel Symbols ............................................................... ................................................................ ................................................................ .. Loading User Symbols Loading unloaded module list ...... For analysis of this file, run !analyze -v nt!KeBugCheckEx: fffff801`47dc1220 48894c2408 mov qword ptr [rsp+8],rcx ss:0018:ffff8701`30ae7d80=0000000000000124 3: kd> !analyze -v ******************************************************************************* * * * Bugcheck Analysis * * * ******************************************************************************* WHEA_UNCORRECTABLE_ERROR (124) A fatal hardware error has occurred. Parameter 1 identifies the type of error source that reported the error. Parameter 2 holds the address of the WHEA_ERROR_RECORD structure that describes the error conditon. Arguments: Arg1: 0000000000000000, Machine Check Exception Arg2: ffffac0e42f51028, Address of the WHEA_ERROR_RECORD structure. Arg3: 00000000be000000, High order 32-bits of the MCi_STATUS value. Arg4: 0000000000800400, Low order 32-bits of the MCi_STATUS value. Debugging Details: ------------------ KEY_VALUES_STRING: 1 Key : Analysis.CPU.Sec Value: 2 Key : Analysis.DebugAnalysisProvider.CPP Value: Create: 8007007e on WYVERN-WS2 Key : Analysis.DebugData Value: CreateObject Key : Analysis.DebugModel Value: CreateObject Key : Analysis.Elapsed.Sec Value: 2 Key : Analysis.Memory.CommitPeak.Mb Value: 65 Key : Analysis.System Value: CreateObject BUGCHECK_CODE: 124 BUGCHECK_P1: 0 BUGCHECK_P2: ffffac0e42f51028 BUGCHECK_P3: be000000 BUGCHECK_P4: 800400 PROCESS_NAME: System STACK_TEXT: ffff8701`30ae7d78 fffff801`47ba4fe8 : 00000000`00000124 00000000`00000000 ffffac0e`42f51028 00000000`be000000 : nt!KeBugCheckEx ffff8701`30ae7d80 fffff801`4b781920 : ffffac0e`39fe4a60 00000000`00000000 ffffac0e`42f51028 00000000`00000000 : hal!HalBugCheckSystem+0xd8 ffff8701`30ae7dc0 fffff801`47f40852 : ffffac0e`39fe4a60 ffff8701`30ae7e49 00000000`00000000 ffffac0e`42f51028 : PSHED!PshedBugCheckSystem+0x10 ffff8701`30ae7df0 fffff801`47ba6946 : ffff8701`30ae7f10 00000000`00000003 ffffac0e`39fe4ab0 ffffac0e`39fe4a60 : nt!WheaReportHwError+0x382 ffff8701`30ae7eb0 fffff801`47ba6dda : 00000000`00000010 ffffac0e`39fe4ab0 ffff8701`30ae8068 ffff8701`30ae82b0 : hal!HalpMcaReportError+0x72 ffff8701`30ae8010 fffff801`47ba6cb4 : ffffac0e`39ee7680 00000000`00000001 00000000`00000000 00000000`00000000 : hal!HalpMceHandlerCore+0xf2 ffff8701`30ae8060 fffff801`47ba6f20 : 00000000`00000010 00000000`00000001 00000000`00000000 00000000`00000000 : hal!HalpMceHandler+0xe0 ffff8701`30ae80a0 fffff801`47ba5fc8 : 00000000`00000000 ffff8701`30ae8330 00000000`00000000 00000000`00000000 : hal!HalpMceHandlerWithRendezvous+0xd4 ffff8701`30ae80d0 fffff801`47ba71a7 : ffffac0e`39ee7680 00000000`00000000 00000000`00000000 00000000`00000000 : hal!HalpHandleMachineCheck+0x5c ffff8701`30ae8100 fffff801`47ea4c70 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : hal!HalHandleMcheck+0x37 ffff8701`30ae8130 fffff801`47dd02ba : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiHandleMcheck+0x10 ffff8701`30ae8160 fffff801`47dcff71 : ffff8701`00000000 fffff801`47dcfeae ffff8701`30a40180 00000000`00000000 : nt!KxMcheckAbort+0x7a ffff8701`30ae82a0 fffff801`61fb138f : fffff801`61fb1424 00000000`00000000 00000003`18e2ee4d ffff8701`30adb180 : nt!KiMcheckAbort+0x271 ffff8000`78c4f6a8 fffff801`61fb1424 : 00000000`00000000 00000003`18e2ee4d ffff8701`30adb180 00000000`00000000 : intelppm!MWaitIdle+0x1f ffff8000`78c4f6b0 fffff801`47c21e3c : 00000000`00000000 00000463`00000082 ffffac0e`4348d000 00000000`00000061 : intelppm!AcpiCStateIdleExecute+0x24 ffff8000`78c4f6e0 fffff801`47c2158e : 00000000`00000003 00000000`00000002 ffffac0e`4348d0f0 00000000`00000008 : nt!PpmIdleExecuteTransition+0x70c ffff8000`78c4fa00 fffff801`47dc4d28 : ffffffff`00000000 ffff8701`30adb180 ffffac0e`481f3040 00000000`00000590 : nt!PoIdle+0x36e ffff8000`78c4fb60 00000000`00000000 : ffff8000`78c50000 ffff8000`78c49000 00000000`00000000 00000000`00000000 : nt!KiIdleLoop+0x48 MODULE_NAME: GenuineIntel IMAGE_NAME: GenuineIntel.sys STACK_COMMAND: .thread ; .cxr ; kb FAILURE_BUCKET_ID: 0x124_GenuineIntel_PROCESSOR_MAE_INTERNAL_TIMER OS_VERSION: 10.0.18362.1 BUILDLAB_STR: 19h1_release OSPLATFORM_TYPE: x64 OSNAME: Windows 10 FAILURE_ID_HASH: {dbae0c63-5a7c-cd3f-eccf-de6e68aa7cf2} Followup: MachineOwner ---------
×