Skip to content

Security: Restore password authentication for EncodingServer#513

Open
r3352 wants to merge 1 commit intogoogle:masterfrom
r3352:fix/encodingserver-auth
Open

Security: Restore password authentication for EncodingServer#513
r3352 wants to merge 1 commit intogoogle:masterfrom
r3352:fix/encodingserver-auth

Conversation

@r3352
Copy link
Copy Markdown
Contributor

@r3352 r3352 commented Apr 6, 2026

Summary

  • The EncodingServer (port 6969) had its entire password authentication block commented out in the source code, allowing unauthenticated command execution
  • Restores the original authentication logic and adds backward-compatible fallback when no password is configured

Vulnerability Details

CWE-306 (Missing Authentication for Critical Function)

EncodingServer.java:232-241 contains a password authentication check wrapped in a /* */ block comment, effectively disabling all authentication. The commented-out code was designed to check ENCODING_SERVER_PASSWORD_MD5 against the client's password. Without it, any network client can connect and issue START, STOP, TUNE, BUFFER, and SWITCH commands to control encoding hardware and specify recording output file paths.

Changes

  • Restored auth logic: Removed the /* */ block comment and // line comments to re-enable password checking
  • Backward compatibility: When ENCODING_SERVER_PASSWORD_MD5 is empty (default), auth is skipped — existing deployments without a configured password continue to work
  • Auth failure handling: Invalid passwords trigger INVALID_PASSWORD response and connection close (via return from the handler, which triggers the finally block cleanup)
  • Charset fix: Changed Sage.CHARSET to Sage.BYTE_CHARSET in auth response lines for consistency with the rest of the file

@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 6, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@r3352 r3352 force-pushed the fix/encodingserver-auth branch from 19452af to b732a8e Compare April 6, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant