[ZBX-4316] suboptimal http response code validation Created: 2011 Nov 03  Updated: 2017 May 30  Resolved: 2012 Aug 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: 2.0.3rc1, 2.1.0

Type: Incident report Priority: Minor
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

web monitoring http response code error message says :

Warning. Field [status_codes] is not integer range

that's not really correct, as 200,404 is a valid list as well. maybe it should say "...not integer list or range."

also, a response code like 23232323232 is accepted, which isn't really a valid code. at least some limits should be applied



 Comments   
Comment by richlv [ 2012 Aug 27 ]

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html lists currently valid codes.
to be really future proof, i'd probably limit allowed codes to 3 digit integers

Comment by Alexey Fukalov [ 2012 Aug 28 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-4316

Comment by Eduards Samersovs (Inactive) [ 2012 Aug 30 ]

(1) I suggest to create new classes with validation after that when uniform strategy of validation will be created..

<Vedmak> RESOLVED

Comment by Eduards Samersovs (Inactive) [ 2012 Aug 30 ]

(2) New methods lack of PHP doc.. ))

<Vedmak> RESOLVED

Comment by Alexey Fukalov [ 2012 Aug 30 ]

We decide to only change error message and add api validation, max value validation will be implemented in future with form redesign.

Comment by Eduards Samersovs (Inactive) [ 2012 Aug 31 ]

Tested

Comment by Alexey Fukalov [ 2012 Aug 31 ]

Fixed in 2.0.3rc1 29998, 2.1.0rc1 29999

Generated at Fri Apr 19 02:22:28 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.