Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9015829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:50:50+00:00 2026-06-16T03:50:50+00:00

I want to set a password to connect to a Redis server. The appropriate

  • 0

I want to set a password to connect to a Redis server.

The appropriate way to do that is using the requirepass directive in the configuration file.
http://redis.io/commands/auth

However, after setting the value, I get this upon restarting Redis:

Stopping redis-server: redis-server.
Starting redis-server: Segmentation fault (core dumped)
failed

Why is that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:50:52+00:00Added an answer on June 16, 2026 at 3:50 am

    The password length is limited to 512 characters.

    In redis.h:

    #define REDIS_AUTHPASS_MAX_LEN 512
    

    In config.c:

        } else if (!strcasecmp(argv[0],"requirepass") && argc == 2) {
            if (strlen(argv[1]) > REDIS_AUTHPASS_MAX_LEN) {
                err = "Password is longer than REDIS_AUTHPASS_MAX_LEN";
                goto loaderr;
            }
            server.requirepass = zstrdup(argv[1]);
        }
    

    Now, the parsing mechanism of the configuration file is quite basic. All the lines are split using the sdssplitargs function of the sds (string management) library. This function interprets specific sequence of characters such as:

    • single and double quotes
    • \x hex digits
    • special characters such as \n, \r, \t, \b, \a

    Here the problem is your password contains a single double quote character. The parsing fails because there is no matching double quote at the end of the string. In that case, the sdssplitargs function returns a NULL pointer. The core dump occurs because this pointer is not properly checked in the config.c code:

        /* Split into arguments */
        argv = sdssplitargs(lines[i],&argc);
        sdstolower(argv[0]);
    

    This is a bug that should be filed IMO.

    A simple workaround would be to replace the double quote character or any other interpreted characters by an hexadecimal sequence (ie. \x22 for the double quote).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with SQL Server and I want to set the Database password
I am using Python and trying to connect to SFTP and want to retrieve
I can connect to VPN and I can access Sql Server using RDP. Now,
I want to connect to a MySQL server via SSL. More specifically, I want
I've got a locally installed MySQL database server that I want to use for
I use windows authentication, and I want to connect to mssql server with jdbc
I have a set of functions that handle the db connection. I want to
I am trying to connect to a MySQL database using Java. I want to
I want to retrieve the email address from the table and using that to
I want set interfaceOrientation in one UIView as LandscapeLeft and Portrait in other UIView.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.