Summary: | ASTERISK-04923: [patch][post 1.2] app_authenticate maxdigits option | ||
Reporter: | Sergey Basmanov (sb) | Labels: | |
Date Opened: | 2005-08-29 09:16:43 | Date Closed: | 2008-01-15 16:11:53.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_authenticate |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) app_auth.diff ( 1) app_auth2.diff ( 2) app_auth3.diff | |
Description: | Added option: maxdigits - maximum acceptable number of digits. Stops reading after maxdigits have been entered (without requiring the user to press the '#' key). In dialplan: Authenticate(/etc/passwords.txt|a|4) Limits passwords to maximum of 4 digits. | ||
Comments: | By: Olle Johansson (oej) 2005-11-22 09:21:37.000-0600 I would add a "if (option_debug > 2)" in front of that new DEBUG message, in order to only output it with a high level of debugging. Does this patch apply to the current CVS version of the application? /O By: Sergey Basmanov (sb) 2005-11-22 09:31:41.000-0600 Diff against current cvs with changes You suggested. By: Olle Johansson (oej) 2005-11-22 09:36:57.000-0600 Thanks for fast action! By: Russell Bryant (russell) 2005-12-05 15:25:03.000-0600 There is a slight typo in the application description: Authenticate(password[|options][|maxdigits]) should be ... Authenticate(password[|options[|maxdigits]]) By: Russell Bryant (russell) 2005-12-05 15:30:30.000-0600 There are also some indentation issues. Tabs should always be used for indentation instead of spaces. I also think that this application needs to be updated to use the application argument parsing API instead of adding more manual args parsing code. See the other applications for examples on how AST_DECLARE_APP_ARGS and AST_STANDARD_APP_ARGS are used. Thanks! By: Sergey Basmanov (sb) 2005-12-12 03:11:16.000-0600 Diff against svn trunk. Added AST_DECLARE_APP_ARGS and AST_STANDARD_APP_ARGS It is compiling without any warnings, but I can't test it now. drumkilla: Can You please point me where formatting issues? I'm using mc's internal editor, and it uses only tabs (option convert tabs to spaces is off). May be I missed tabs somewhere, but I can't find where it is. Thank You. By: Matt O'Gorman (mogorman) 2006-01-05 14:48:32.000-0600 Added feature in patch 7822 with some changes. By: Matt O'Gorman (mogorman) 2006-01-05 14:48:49.000-0600 commited in trunk By: Digium Subversion (svnbot) 2008-01-15 16:11:53.000-0600 Repository: asterisk Revision: 7822 U trunk/apps/app_authenticate.c ------------------------------------------------------------------------ r7822 | mogorman | 2008-01-15 16:11:53 -0600 (Tue, 15 Jan 2008) | 5 lines Added feature from bug ASTERISK-4923, allowing for app_authenticate to set a max number of digits also implemented the new argument and option parsing code. ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7822 |