Skip to content

[BUG] Login issue with Newsflash #240

Description

@dbodyas

Checklist

  • I searched existing issues and did not find a duplicate.
  • I tested with the latest release (or latest main build if relevant).
  • I can reproduce this issue consistently.

Environment

  • Fusion version: 1.1.1
  • Deployment type: Docker
  • OS: Ubuntu 25.10

Steps to Reproduce

  1. run Newsflash
  2. use Fever api and fill in url and credentials
  3. get login error

Current Behavior

Enable to login with Newsflash app

Expected Behavior

Successful login.

Logs / Screenshots

In that Rss client dev is using multipart form to send data link .
let response = request_builder.multipart(form).send().await?;

But Fusion api expects application/x-www-form-urlencoded

Fix should look like this (successfully built and tested)

diff --git a/backend/internal/handler/fever.go b/backend/internal/handler/fever.go
index 2024b2a..58290d0 100644
--- a/backend/internal/handler/fever.go
+++ b/backend/internal/handler/fever.go
@@ -76,9 +76,17 @@ func (h *Handler) fever(c *gin.Context) {
 		return
 	}

-	if err := c.Request.ParseForm(); err != nil {
-		badRequestError(c, "invalid request")
-		return
+	contentType := c.Request.Header.Get("Content-Type")
+	if strings.Contains(contentType, "multipart/form-data") {
+		if err := c.Request.ParseMultipartForm(32 << 20); err != nil {
+			badRequestError(c, "invalid request")
+			return
+		}
+	} else {
+		if err := c.Request.ParseForm(); err != nil {
+			badRequestError(c, "invalid request")
+			return
+		}
 	}

 	if !hasFeverFlag(c.Request.Form, "api") {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions