Voicemail: Add option to lock the password (i.e. for shared mailboxes) - #31
Open
hannes427 wants to merge 6 commits into
Open
Voicemail: Add option to lock the password (i.e. for shared mailboxes)#31hannes427 wants to merge 6 commits into
hannes427 wants to merge 6 commits into
Conversation
If the password is prefix by '-', the password is locked (see https://github.com/asterisk/asterisk/blob/2d7948fa483c8703cf9948811fd67147f4d560d4/configs/samples/voicemail.conf.sample#L330 for details). Bugfix FreePBX/issue-tracker#151
Contributor
Author
|
@kguptasangoma This is the new pull request without the i18n files. |
Contributor
|
If this is intended as a security feature, it's very trivial to just remove the dash from the hidden input value. The server-side code should be checking for a leading dash and not allowing updates from UCP in that case. |
miken32
reviewed
Apr 2, 2025
miken32
left a comment
Contributor
There was a problem hiding this comment.
str_starts_with($settings['pwd'], '-') seems simpler to read at a glance than the regex, IMO
If the password is prefixed by '-', the password is locked (see https://github.com/asterisk/asterisk/blob/2d7948fa483c8703cf9948811fd67147f4d560d4/configs/samples/voicemail.conf.sample#L330 for details). * Add server-side check in ucp/Voicemail.class.php check for leading '-' in the old password before password is saved * Replaced regex in ucp/views/vmsettings.php by str_starts_with() * Modified regex in functions.inc.php to allow voicemail passwords with leading '-' in admin-panel
If the password is prefixed by '-', the password is locked (see https://github.com/asterisk/asterisk/blob/2d7948fa483c8703cf9948811fd67147f4d560d4/configs/samples/voicemail.conf.sample#L330 for details). * Add server-side check in ucp/Voicemail.class.php check for leading '-' in the old password before password is saved * Replaced regex in ucp/views/vmsettings.php by str_starts_with() * Modified regex in functions.inc.php to allow voicemail passwords with leading '-' in admin-panel Bugfix FreePBX/issue-tracker#151
If the password is prefixed by '-', the password is locked (see https://github.com/asterisk/asterisk/blob/2d7948fa483c8703cf9948811fd67147f4d560d4/configs/samples/voicemail.conf.sample#L330 for details). * Add server-side check in ucp/Voicemail.class.php check for leading '-' in the old password before password is saved * Replaced regex in ucp/views/vmsettings.php by str_starts_with() * Modified regex in functions.inc.php to allow voicemail passwords with leading '-' in admin-panel Bugfix FreePBX/issue-tracker#151
Contributor
Author
|
@miken32 Thank you for your comments. Added a new PR with your modifications |
* Removed displaying '-' from Voicemail Pin in UCP if password is locked
Contributor
|
hi @miken32 thanks for your feedback on this PR. Just want to know how does this PR now looks to you? |
Contributor
|
Much improved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If the password is prefix by '-', the password is locked (see https://github.com/asterisk/asterisk/blob/2d7948fa483c8703cf9948811fd67147f4d560d4/configs/samples/voicemail.conf.sample#L330 for details).
Bugfix FreePBX/issue-tracker#151