Open Source Training Seminar FreePBX Paid Support

Ticket #2788 (new Bugs)

Opened 4 months ago

Last modified 1 week ago

Allow * in voicemail password

Reported by: VoipForces Assigned to:
Priority: minor Milestone: 2.5
Component: Voicemail Version: 2.3.1
Keywords: Cc:
Confirmation: Need Feedback SVN Revision (if applicable):
Backend Engine: Asterisk 1.4.x Backend Engine Version:

Description

The Asterisk voicemail application allows a user to change it's password and allows for the star (*) digit to be used in this password.

If a user does so (through *97 or *98), he is still able to access his voicemail box through his phone, but ARI will not accept this password. Also the freepbx Extension page (voicemail section) will show the '>' character in the 'Voicemail Password', 'Email Address' and 'Pager Email Address' fields.

Attachments

mantis_110.patch (6.5 kB) - added by VoipForces on 07/28/08 10:29:35.
New patch against 2.4.1 code

Change History

04/15/08 08:16:08 changed by VoipForces

The attached patch will allow to support star digit in the voicemail password in both the voicemail module and ARI

04/17/08 08:33:28 changed by VoipForces

The current patch seems to have problem with voicemail that are not in the default context and where the password contains a star. Working on fixing this.

07/01/08 14:19:55 changed by lazytt

any update on this?

07/01/08 14:21:18 changed by lazytt

  • priority changed from major to minor.
  • summary changed from Asterisk voicemail application permits star (*) digit in the password, but if a user does so, extension page info is corrupted to Allow * in voicemail password.

07/02/08 00:32:11 changed by p_lindheimer

  • milestone changed from Cut Line to 2.5.

(follow-ups: ↓ 7 ↓ 9 ) 07/02/08 06:32:19 changed by VoipForces

I just updates the new patch that takes care of this.

(in reply to: ↑ 6 ) 07/02/08 06:57:41 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.

Replying to VoipForces:

I just updates the new patch that takes care of this.

Shouldn't the lines that look like this:

if (preg_match("/^\s*(\d+)\s*=>\s*(.*),(.*),(.*),(.*),(.*)\s*([;#].*)?/",$line,$matches)) { 

be a little more specific, can you try ([\d*]*) or what ever the proper regex syntax would be to allow digits and * only, and not just anything. (sorry my regex is always rusty so not sure if that is correct):

if (preg_match("/^\s*(\d+)\s*=>\s*([\d*]*),(.*),(.*),(.*),(.*)\s*([;#].*)?/",$line,$matches)) { 

and then update the patch and we can have a look. Thanks!

07/02/08 07:00:23 changed by VoipForces

I'm very good at regex either... I'll try the ([\d*]*) and see what it does.

(in reply to: ↑ 6 ) 07/02/08 07:02:59 changed by p_lindheimer

Replying to VoipForces:

I just updates the new patch that takes care of this.

Sorry just noticed also, the removal of this:

"frm_${display}_isVoiceMailEnabled() && !isInteger()", $msgInvalidVmPwd, false)); 

that should not be removed, it will need a different check then !isInteger() (and maybe $msgInvalidVmPwd) but that needs to be addressed or it will allow bogus passwords to be input. Thanks again in advance.

07/11/08 16:49:30 changed by p_lindheimer

VoiPForces:

any update here, if we can get a proper validation in the vm module and the other changes confirmed or updated then we can put them into the release for some testing.

07/25/08 18:44:10 changed by p_lindheimer

VoipFOrces - ping, were you going to take care of the last tidbits here so we can put your fix in?

07/28/08 06:31:22 changed by VoipForces

I am planing this for this morning provided I do not get a gizilion calls.

07/28/08 08:01:18 changed by VoipForces

I created a new validation javascript function:

function isValidPwd(s){var i;if(isEmpty(s)) if(isAlphanumeric.arguments.length==1)return defaultEmptyOK;else return(isAlphanumeric.arguments[1]==true);for(i=0;i<s.length;i++){var c=s.charAt(i);if(!(isDigitStar(c))) return false;} return true;}

and

function isDigitStar(c)

{return((c>="0")&&(c<="9")(c=="*"))}

But even if I put letters in the password field they are accepted... Any hints ?

07/28/08 09:11:37 changed by VoipForces

My firefox javascript error console tells me that isValidPwd is not defined, however it is in common/libfreepbx.javascripts.js

07/28/08 10:18:04 changed by VoipForces

Forget it is was a browser cache issue...

07/28/08 10:29:35 changed by VoipForces

  • attachment mantis_110.patch added.

New patch against 2.4.1 code

07/28/08 10:30:09 changed by VoipForces

Ok, just uploaded the new patch against the 2.4.1 release

07/28/08 11:54:45 changed by lazytt

Please reattach in diff format so that trac can recognize the file. diff -uUb > path.diff (i think)

07/28/08 12:30:11 changed by VoipForces

The attached patch was done with

diff-ru

Which is the same method I used the last time. But it is against 2.4.1 and this ticket is tagged to 2.3.1, maybe trac is not able to sync because of that ?

07/28/08 12:42:02 changed by lazytt

trac doesn't actually compere the diff based on the svn - it comperes it based on the patch file itself... This usually works (I posted it wrong last time):

diff -ubB original_file modified_file > file.diff

07/28/08 12:57:16 changed by VoipForces

Ok, so since 3 files are modified for this patch I have to submit 3 patches ?

07/28/08 13:40:02 changed by lazytt

If you do a svn diff then you can output it all in one file (and if you going to pull from svn you may want to take a peek at 2.5 ...)

07/30/08 19:54:36 changed by p_lindheimer

VoipForces?,

thanks for the update however there is an issue. libfreepbx.javascripts.js is an auto-generated file meaning you can't change that. (Not really true, the truth is you need to change the source javascript file where it came from.) You can simply remove the libfreepbx.javascript.js file from your commons diretory and FreePBX will use the unpacked versions where you can make the suggested changes. We'll pack them back up when we package the changes. I believe the file you need to change is in: script.legacy.js.

Next - you mentioned that ARI will not accept the password if changed to * but I don't see any patch to fix the ARI to allow this? Am I missing something?

As far as the patch file. It looks like what you are generating is fine but for some reason trac doesn't like it which is a bit of an inconvenience because we can't just review the patch in trac, so if there is anything you can do to make it viewable in trac it would be appreciated.

thanks again.

08/11/08 12:37:46 changed by p_lindheimer

VoipForces?,

ping - were you going to do the last tidbits mentioned above plus the require fix for ARI? Otherwise I'll probably move this out of the release as the changes touch quite a few files. Thanks in advance.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads