Lädt...

🔧 Request Parameters getting set to favicon.ico on GET requests


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

You’ve just deployed your first backend web app, ready to accept requests, and everything seems to be running smoothly. Then, out of nowhere, you get a notification that your web app has crashed. You check the error and see:
invalid input: "favicon.ico"
Favicon Error

The term sounds familiar, but you’re sure you’ve never used anything like this in your backend. What is it?

Well, favicon stands for "favorite icon," and it’s the small icon that appears in your browser tab next to the page title. You’ve probably noticed it — it’s that little logo next to the website’s name in your browser. Yep, that’s the one!

Favicon image

Let me guess — you never set this up for your app because it was just a quick project to help you get familiar with HTTP, Node, or Express, or something similar. You might not even want a favicon, because, like me, you're just too lazy to bother with it 😅.

So, why did this happen?

Browsers automatically try to request /favicon.ico from the root directory to display the icon in the browser tab. When that request fails, your app crashes.

How can you fix it?

There are two ways:

  1. The easy way: Catch the favicon request and send a No Content status. javascript
app.get('/favicon.ico', (req, res) => {
  res.status(204).end();
});
  1. Or: Provide a favicon.ico file in the root directory of your app. Both methods will prevent the app from crashing.
...

🔧 Request Parameters getting set to favicon.ico on GET requests


📈 78.59 Punkte
🔧 Programmierung

🔧 Favicon Wizardry: How to Create and Add a Favicon to Your Site


📈 36.08 Punkte
🔧 Programmierung

🕵️ gdk-pixbuf ICO File io-ico.c denial of service


📈 29.6 Punkte
🕵️ Sicherheitslücken

🕵️ gdk-pixbuf ICO File io-ico.c Denial of Service


📈 29.6 Punkte
🕵️ Sicherheitslücken

🕵️ gdk-pixbuf bis 2.35.2 ICO File Handler io-ico.c OneLine32 Denial of Service


📈 29.6 Punkte
🕵️ Sicherheitslücken

🕵️ gdk-pixbuf bis 2.35.2 ICO File Handler io-ico.c OneLine32 Denial of Service


📈 29.6 Punkte
🕵️ Sicherheitslücken

🔧 Why we need both Query String Parameters and Path Parameters


📈 27.34 Punkte
🔧 Programmierung

🔧 JavaScript: Default Parameters, Spread Operator, Rest Parameters, and Destructuring!


📈 27.34 Punkte
🔧 Programmierung

🔧 Event Tracking and Parameters: Setting up custom events and parameters in Google Analytics 4


📈 27.34 Punkte
🔧 Programmierung

📰 ICO slams UK Met Police for failure to handle public data requests


📈 25.07 Punkte
📰 IT Security Nachrichten

🕵️ Resolving Input Parameters for Rest API Requests


📈 23.94 Punkte
🕵️ Sicherheitslücken

🔧 Path vs. Query Parameters: Choosing the Right Approach for API Requests


📈 23.94 Punkte
🔧 Programmierung

🕵️ CVE-2024-35451 | LinkStack up to 4.7.7 favicon.blade.php server-side request forgery


📈 22.21 Punkte
🕵️ Sicherheitslücken

🕵️ CVE-2024-7568 | Favicon Generator Plugin up to 1.5 on WordPress cross-site request forgery


📈 22.21 Punkte
🕵️ Sicherheitslücken

🕵️ CVE-2024-1063 | Appwrite up to 1.4.13 /v1/avatars/favicon server-side request forgery


📈 22.21 Punkte
🕵️ Sicherheitslücken

🕵️ Medium CVE-2020-7715: Deep-get-set project Deep-get-set


📈 21.8 Punkte
🕵️ Sicherheitslücken

📰 ICO Set to Scale Back Public Sector Fines


📈 21.18 Punkte
📰 IT Security Nachrichten