(SOLVED) Bug? Customer.pl is confusing some customers

Moderator: crythias

Locked
bayerex
Znuny expert
Posts: 164
Joined: 03 Dec 2012, 00:30
Znuny Version: 3.2.7

(SOLVED) Bug? Customer.pl is confusing some customers

Post by bayerex »

Hi,

there seems to be a problem with Customer.pl. If a customer has not yet self-registered but clicks "Forgot Password" and submits their email address, the system claims it will send them a new password. But of course it doesn't.

Surely it should write something like "You are not yet a registered user of this system, please register".

Is this a bug? or something I can quickly fix?

Thanks.
Last edited by bayerex on 10 Dec 2012, 23:20, edited 1 time in total.
Current Production Server (recently switched from Windows)
OTRS 3.2.7 on Ubuntu 12.04LTS 64bit
PHP 5.3.10-1ubuntu3.6
mysql Ver 14.14 Distrib 5.5.31

Previous Production Server:
Windows 2008
MySQL 5.1.51 Community Server
Strawberry Perl 5.12.3.0
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Bug? Customer.pl is confusing some customers

Post by crythias »

It's not necessarily a bug.It's not *always* a good idea to let someone (potentially a bad guy) know that the username is valid/invalid.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
bayerex
Znuny expert
Posts: 164
Joined: 03 Dec 2012, 00:30
Znuny Version: 3.2.7

Re: Bug? Customer.pl is confusing some customers

Post by bayerex »

crythias wrote:It's not necessarily a bug.It's not *always* a good idea to let someone (potentially a bad guy) know that the username is valid/invalid.
Yeah I know what you mean and I had a feeling this would be your view. However we would still prefer to use something more helpful in this case. Even this forum for example indicates if you're requesting a password for an invalid address.

Ok so you're saying you believe it's not a bug it's a wish?
Current Production Server (recently switched from Windows)
OTRS 3.2.7 on Ubuntu 12.04LTS 64bit
PHP 5.3.10-1ubuntu3.6
mysql Ver 14.14 Distrib 5.5.31

Previous Production Server:
Windows 2008
MySQL 5.1.51 Community Server
Strawberry Perl 5.12.3.0
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Bug? Customer.pl is confusing some customers

Post by crythias »

From Standard/CustomerLogin.dtl:

Code: Select all

<!-- dtl:block:LostPassword -->
            <div id="Reset">
                <a href="#Login" class="InlineNavigation">&larr; $Text{"Back"}</a>
                <h2>$Text{"Request new password"}</h2>
                <form class="Floating" action="$Env{"CGIHandle"}" method="post" enctype="application/x-www-form-urlencoded">
                    <input type="hidden" name="Action" value="CustomerLostPassword" />
                    <input type="hidden" name="Lang" value="$Env{"UserLanguage"}" />
                    <div>
                        <label for="ResetUser">$Text{"User name"}</label>
                        <input title="$Text{"Your User Name"}" type="text" id="ResetUser" name="User" maxlength="150" />
                    </div>
                    <div>
                        <button type="submit" value="$Text{"Submit"}">$Text{"Submit"}</button>
                    </div>
                    <div class="Clear"></div>
                </form>
                <p>$Text{"A new password will be sent to your email address."}</p>
            </div>
<!-- dtl:block:LostPassword -->
CustomerLostPassword action is in Kernel/System/Web/InterfaceCustomer.pm:

Code: Select all

        my %UserData = $Self->{UserObject}->CustomerUserDataGet( User => $User );
        if ( !$UserData{UserID} ) {

            # Security: pretend that password reset instructions were actually sent to
            #   make sure that users cannot find out valid usernames by
            #   just trying and checking the result message.
            $LayoutObject->Print(
                Output => \$LayoutObject->CustomerLogin(
                    Title   => 'Login',
                    Message => 'Sent password reset instructions. Please check your email.',
                ),
            );
            return;
        }
bayerex wrote:Ok so you're saying you believe it's not a bug it's a wish?
It's not a bug. It's hard coded that way. Although now that you know where it is you certainly can change the message. It won't survive updates, but you can do as you wish.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Bug? Customer.pl is confusing some customers

Post by jojo »

all typical security guidelines need that no hint is given if the username is existing.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
bayerex
Znuny expert
Posts: 164
Joined: 03 Dec 2012, 00:30
Znuny Version: 3.2.7

Re: Bug? Customer.pl is confusing some customers

Post by bayerex »

super! thanks guys
Current Production Server (recently switched from Windows)
OTRS 3.2.7 on Ubuntu 12.04LTS 64bit
PHP 5.3.10-1ubuntu3.6
mysql Ver 14.14 Distrib 5.5.31

Previous Production Server:
Windows 2008
MySQL 5.1.51 Community Server
Strawberry Perl 5.12.3.0
Locked