GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: validate URI scheme in isValid() to reject non-Redis URIs by eddieran · Pull Request #4486 · redis/jedis

Conversation

@eddieran

@eddieran eddieran commented Apr 13, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Fixes #4483

JedisURIHelper.isValid() only checked that a URI scheme was present, but did not validate it was redis or rediss. This meant URIs like https://user:pass@host:6380 passed validation and could silently connect in plaintext, transmitting credentials without TLS.

Changes:

  • isValid() now checks the scheme against the existing REDIS and REDISS constants
  • Added test cases verifying that http, https, and ftp schemes are rejected while redis and rediss are accepted

Test plan

  • Added shouldRejectNonRedisSchemes test in JedisURIHelperTest
  • Existing shouldValidateInvalidURIs test continues to pass
  • Full test suite passes

Note

Medium Risk
Changes URI validation behavior in a security-sensitive path; could break callers that previously (incorrectly) passed non-redis/rediss URIs, but the code change is small and well-covered by new tests.

Overview
Tightens JedisURIHelper.isValid(URI) to reject any non-Redis URI schemes, requiring redis:// or rediss:// (now case-insensitive) in addition to host+port.

Updates scheme helpers to use equalsIgnoreCase and adds targeted tests covering non-Redis scheme rejection, mixed-case scheme acceptance, and typoed-scheme rejection to prevent accidental plaintext connections.

Reviewed by Cursor Bugbot for commit 99af5ca. Bugbot is set up for automated code reviews on this repo. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jit-ci

jit-ci Bot commented Apr 13, 2026

Copy link
Copy Markdown

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eddieran
fix: validate URI scheme in isValid() to prevent silent plaintext con…
c5ee5d5
…nections

URIs with non-Redis schemes (e.g. https://) were accepted by isValid(),
which could cause credentials to be silently sent over plaintext connections.
Now only 'redis' and 'rediss' schemes are accepted.

Fixes redis#4483
@eddieran
eddieran force-pushed the fix/uri-scheme-validation branch from 9e938b8 to c5ee5d5 Compare April 13, 2026 09:21
@eddieran eddieran mentioned this pull request Apr 13, 2026
[Security] Missing URI scheme validation allows silent plaintext credential transmission #4483
Closed
eddieran and others added 4 commits April 15, 2026 07:28
@eddieran
ci: retrigger CI (flaky FailbackMechanismIntegrationTest timeout)
69f0a96
@ggivo
Merge branch 'master' into fix/uri-scheme-validation
bf3123a
@ggivo
Merge branch 'master' into fix/uri-scheme-validation
ac23fb0
@ggivo
polish
99af5ca
ggivo
ggivo approved these changes Apr 22, 2026
View reviewed changes

@ggivo ggivo left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ggivo
ggivo merged commit fa219c3 into redis:master Apr 22, 2026
16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ggivo ggivo added the bug label Apr 22, 2026
@ggivo ggivo added this to the 8.0.0 milestone Apr 22, 2026
@ggivo

ggivo commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

@eddieran
Thanks for reporting and taking the time to address it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@ggivo ggivo ggivo approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug

Projects

None yet

Milestone

8.0.0

Development

Successfully merging this pull request may close these issues.

[Security] Missing URI scheme validation allows silent plaintext credential transmission

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@eddieran @ggivo
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.