#15535·OrcaSlicer

Moonraker trusted-client authentication broken by hardcoded 88888888 access code in v2.4.2

Author: sezgynusCreated Sep 4, 2026Updated Oct 1, 2026
Labelsbug

Is this issue reproducible in the latest nightly build?

  • I have checked the latest nightly build and the issue is still reproducible

Is there an existing issue for this problem?

  • I have searched the existing issues

OrcaSlicer Version

2.4.2

Regression compared to a previous version

No response

Operating System (OS)

Windows

OS Version

Windows 11

Additional system information

Summary

OrcaSlicer 2.4.2 sends X-Api-Key: 88888888 when connecting to a Moonraker instance configured to allow trusted clients without API-key authentication.

This causes Moonraker to return:

401 Invalid API Key

even though the client IP is explicitly configured as a trusted client.

The problem prevents Happy Hare filament/lane data synchronization from working in OrcaSlicer.

Environment OrcaSlicer: 2.4.2 Build: 8500fcdc Moonraker: current version at the time of testing Klipper: current installation Happy Hare: installed and functioning Connection: HTTP Moonraker port: 7125 Client: Windows PC Client IP: 192.168.1.2 Moonraker host: openeye3dpi.local Moonraker configuration

The Moonraker instance has trusted clients configured:

[authorization] trusted_clients: 127.0.0.1 192.168.0.0/16 10.0.0.0/8 169.254.0.0/16 172.16.0.0/12 127.0.0.0/8 FE80::/10 ::1/128

The client 192.168.1.2 is therefore inside the trusted 192.168.0.0/16 range.

Moonraker also reports:

{ "result": { "default_source": "moonraker", "available_sources": ["moonraker"], "login_required": false, "trusted": true } } Expected behavior

When OrcaSlicer connects from a trusted client, requests should be sent without an API key:

GET /server/database/item?namespace=lane_data HTTP/1.1 Host: openeye3dpi.local User-Agent: OrcaSlicer/2.4.2 Accept: /

Moonraker correctly accepts this request and returns HTTP 200.

For example, the same request made manually from the Windows client:

curl.exe -i "http://openeye3dpi.local:7125/server/database/item?namespace=lane_data"

returns:

HTTP/1.1 200 OK

and returns the expected Happy Hare lane_data.

Actual behavior

OrcaSlicer 2.4.2 sends:

GET /server/database/item?namespace=lane_data HTTP/1.1 Host: openeye3dpi.local User-Agent: OrcaSlicer/2.4.2 Accept: / X-Api-Key: 88888888

Moonraker then responds:

401 Invalid API Key

Moonraker logs:

401 GET /server/database/item?namespace=lane_data (192.168.1.2): Invalid API Key

The same behavior occurs for the Happy Hare fallback request:

GET /printer/objects/query?mmu HTTP/1.1

which also receives HTTP 401.

Wireshark evidence

The request was captured directly with Wireshark.

The relevant packet contains:

GET /server/database/item?namespace=lane_data HTTP/1.1 Host: openeye3dpi.local User-Agent: OrcaSlicer/2.4.2 Accept: / X-Api-Key: 88888888

This confirms that the API key is actually being sent by OrcaSlicer and is not being injected by a proxy or Moonraker.

OrcaSlicer configuration behavior

The following entries exist in:

%APPDATA%\OrcaSlicer\OrcaSlicer.conf "access_code": { "192.168.1.10": "88888888", "openeye3dpi.local": "88888888" }

and:

"user_access_code": { "192.168.1.10": "88888888", "openeye3dpi.local": "88888888" }

Removing these values manually does not solve the problem. After restarting OrcaSlicer, the values are written back automatically.

No other normal OrcaSlicer configuration files contain this value.

Relevant source-code behavior

In MoonrakerPrinterAgent.cpp, HTTP requests for Moonraker filament data are constructed approximately as follows:

auto http = Http::get(url);

if (!device_info.api_key.empty()) { http.header("X-Api-Key", device_info.api_key); }

This behavior itself is correct: if no API key is configured, no X-Api-Key header should be sent.

However, the Moonraker device announcement/access-code logic uses a fallback value when no API key is present:

const std::string access_code = device_info.api_key.empty() ? "88888888" : device_info.api_key;

app_config->set_str("access_code", device_info.dev_id, access_code); app_config->set_str("user_access_code", device_info.dev_id, access_code);

As a result, an installation that intentionally uses Moonraker's trusted-client authentication can end up with 88888888 being persisted as an access code and subsequently treated as the Moonraker API key.

Why this is problematic

88888888 is not a valid Moonraker API key for this installation.

More importantly, the presence of an invalid API-key header prevents the request from being handled as a trusted-client request.

Therefore:

Trusted client ↓ No authentication required ↓ Expected: HTTP 200

becomes:

Trusted client ↓ Orca sends X-Api-Key: 88888888 ↓ Moonraker validates the supplied key ↓ Invalid API key ↓ HTTP 401

This makes trusted-client authentication effectively unusable for OrcaSlicer/Moonraker connections where no API key is configured.

Impact

This breaks Moonraker-based filament synchronization.

For example, Happy Hare exposes:

lane_data

through:

/server/database/item?namespace=lane_data

and also exposes MMU state through:

/printer/objects/query?mmu

Both endpoints work correctly without an API key when accessed from the trusted client.

However, OrcaSlicer receives HTTP 401 for both requests because of the automatically supplied 88888888 API key.

The Orca log consequently reports:

Failed to fetch lane data: (HTTP 401) Failed to fetch HH data: (HTTP 401) No MMU system detected (neither HH nor Moonraker)

The Happy Hare/MMU is therefore incorrectly reported as unavailable.

Reproduction steps Configure Moonraker with a trusted client network, for example: [authorization] trusted_clients: 192.168.0.0/16 Do not configure an API key for the OrcaSlicer Moonraker connection. Connect OrcaSlicer 2.4.2 to the Moonraker instance. Trigger filament/MMU synchronization. Capture the traffic with Wireshark. Observe: X-Api-Key: 88888888 Moonraker responds: HTTP 401 Invalid API Key Manually repeat the same request without X-Api-Key: curl.exe -i "http://openeye3dpi.local:7125/server/database/item?namespace=lane_data" Observe: HTTP 200 OK

This demonstrates that the Moonraker trusted-client configuration is working correctly and that the failure is caused by OrcaSlicer's authentication behavior.

Suggested fix

When no Moonraker API key is configured, OrcaSlicer should not create or persist a fake access code such as 88888888 for Moonraker devices.

The behavior should instead be:

if (!device_info.api_key.empty()) { http.header("X-Api-Key", device_info.api_key); }

with no fallback API key being generated or stored when device_info.api_key is empty.

In other words:

No API key configured ↓ No X-Api-Key header ↓ Moonraker trusted-client authentication ↓ HTTP 200

An alternative solution would be to clearly separate Orca's internal access_code concept from Moonraker's API-key authentication so that the fallback access code can never be interpreted as a Moonraker API key.

Additional observation

The issue appears to be specific to the interaction between OrcaSlicer 2.4.2's access-code handling and newer Moonraker authentication behavior.

The same Moonraker instance accepts the request without an API key, proving that the trusted-client configuration itself is valid.

The failure is therefore not caused by:

Happy Hare lane_data Moonraker's trusted-client CIDR network connectivity the Moonraker endpoint the HTTP request itself

The failure is specifically caused by OrcaSlicer sending an invalid API key when no API key was configured.

Relevant files

OrcaSlicer source:

src/slic3r/Utils/MoonrakerPrinterAgent.cpp

Affected functionality:

MoonrakerPrinterAgent → fetch_moonraker_filament_data() → /server/database/item?namespace=lane_data

MoonrakerPrinterAgent → fetch_hh_filament_info() → /printer/objects/query?mmu Request

Please investigate the 88888888 fallback access-code behavior in OrcaSlicer 2.4.2 and ensure that Moonraker connections without an API key do not send an X-Api-Key header.

A trusted Moonraker client should be able to use the integration without entering or generating an API key.

Printer

OpenEYE Peacock V1

How to reproduce

  1. Configure Moonraker with a trusted client, for example:
ini
[authorization]
trusted_clients:
    192.168.0.0/16
  1. Do not configure an API key for the Moonraker printer connection in OrcaSlicer.

  2. Connect the printer to OrcaSlicer 2.4.2.

  3. Trigger the MMU/filament synchronization.

  4. Capture the HTTP traffic with Wireshark.

  5. Observe that OrcaSlicer sends:

http
GET /server/database/item?namespace=lane_data HTTP/1.1
X-Api-Key: 88888888
  1. Moonraker responds with:
HTTP 401 Invalid API Key
  1. Send the same request manually without the X-Api-Key header:
GET /server/database/item?namespace=lane_data

The request succeeds with HTTP 200 OK because the client is trusted.

The issue is therefore reproducible when OrcaSlicer 2.4.2 is used with a Moonraker instance relying on trusted-client authentication without an API key.

Actual results

Image

Expected results

When no API key is configured for the Moonraker connection, OrcaSlicer should not send an X-Api-Key header.

The request should be sent without authentication:

http
GET /server/database/item?namespace=lane_data HTTP/1.1
Host: openeye3dpi.local
User-Agent: OrcaSlicer/2.4.2
Accept: */*

Since the client IP is configured as a trusted client in Moonraker, the request should return:

HTTP 200 OK

OrcaSlicer should then successfully retrieve the Happy Hare lane_data and synchronize the MMU filament information.

No 88888888 fallback value should be generated, stored, or used as a Moonraker API key.

Project file & Debug log uploads

debug_Fri_Sep_04_16_04_17_27428.zip

Checklist of files to include

  • Log file
  • Project file

Anything else?

No response