添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
急躁的吐司  ·  Zabbix Web Monitoring ...·  1 月前    · 
活泼的小熊猫  ·  3 身份验证·  3 月前    · 
重感情的饭卡  ·  监控软件 Zabbix 和 ...·  5 月前    · 
大力的枕头  ·  ERROR: Cannot create ...·  5 月前    · 
坚强的橙子  ·  [#ZBXNEXT-2074] web ...·  8 月前    · 
不羁的肉夹馍  ·  hexo-theme-material | ...·  1 月前    · 
风度翩翩的豌豆  ·  Comment aménager la ...·  1 月前    · 
慈祥的课本  ·  No module named ...·  1 月前    · 
[ZBXNEXT-2074] web monitoring variables are not URL-encoded Created: 2013 Dec 17  Updated: 2021 Jan 04  Resolved: 2017 Apr 24

Variables are not URL-encoded.
it's in the documentation mentioned but it's a bit annoying to encode manually every login / password when doing a webpage check for variables and posts
there are easy options in php to do this automatic

Variable values should be encoded when the server performs the check, not in the frontend.

Comment by Luiz R Malheiros 2014 Mar 06

This is worse than it looks like.

Not only URL-Encoding at the frontend, the URL-encoding must be implemented on the server as well as an option of some kind.

Real life example: We have a scenario that we grab session variables from a regexp from previous steps (feature of 2.2), but when we need to post those same variables, the web server expects to recieve them URL-encoded, else it fails reporting corrupted session information.

We cannot URL-encode dynamic variables that will be given by previous steps, so in the end we cannot use Zabbix web monitoring for those services.

Best,

Comment by Jonathan Nagy 2014 Mar 17

I am facing the exact scenario Luiz has outlined. We have a set of .NET webform applications and I would like to verify login functionality (and hense database connectivity), but I need to read out the __VIEWSTATE and __EVENTVALIDATION hidden fields and return them in a postback. I can read the variables through a regex variable, but I need to url-encode them so I don't get a viewstate corrupted exception. It seems legacy web application that don't otherwise get a lot of attention are perfect for automated monitoring. Without url-encoding, all I can do is make sure the web application is running, but I can't test for database connectivity without some minimal level of interaction.

Comment by richlv 2014 Apr 10

discussed and researched a bit this one.
to do it properly, we would have to urlencode all of the data we send to webservers (get, post).

while cli utility seems to allow urlencoding post data ( http://curl.haxx.se/docs/manpage.html#--data-urlencode ), there does not seem to be an option for that in libcurl.
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html says on CURL_POSTFIELDS :
"You must make sure that the data is formatted the way you want the server to receive it. libcurl will not convert or encode it for you. Most web servers will assume this data to be url-encoded."

on top of that, it would be a breaking change - we would have to do this in a major version and provide a database patch to url-decode existing data in webscenario configuration.

thus this -> not bugsquashable

Comment by dimir 2014 Apr 10

<richlv> except the breakage of existing scenarios

dimir How about adding an option "URL-encode"?

Comment by 2014 May 19

Ran into this while trying to setup a web check for rails application. The authenticity_token sometimes includes + characters and there seems to be no way to escape the extracted variable.

Comment by 2014 Nov 09

The attached patch [^zbxNext2074-interimRegExpOnly-2.2.5.patch] is a quick 'n dirty way of at least escaping post variables that are based on regular expressions. It's not really tested but seems to do it for me.

Even when all variables should be escaped properly, this appears to be a good compromise for now. Covering the other user provided variables as well would require un-escaping of existing values as already mentioned. But for these exists a work-around by escaping them manually. For the on-the-fly extracted values that's not possible and thus might end in the inability to monitor a web service by Zabbix.

Many thanks to dimir for pointing in the right direction!

Comment by 2014 Nov 11

Okay, turned out that the previous patch zbxNext2074-interimRegExpOnly-2.2.5.patch, was a bit too dirty - thus removed
zbxNext2074-interimRexExpOnly-2.2.7.patch makes sure not to crash e.g. when the regular expression contains no group to capture.

Comment by dimir 2015 Oct 06

We were thinking, would it be enough, would it cover all use cases if we add an option to encode Post and Get variables? E. g. in the Post field of a step, instead of current

id=2345&sessid={sessid}

use something like

id=2345&sessid={encode:sessid}
            Comment by  
                2015 Oct 06
            

dimir,

That sounds quite decent to me. It still won't break legacy scenarios but provides the flexibility to encode individual per web macro.
Inspired by that I could even also think of supporting curl_easy_unescape() for decoding:

{decode:sessid}

Just to allow every thinkable variation - as one must always expect web applications not to (consistently) following every RFC.

Finally I just found out that I was wrong, when thinking that every POST variable must be percent encoded. The correct answer is apparently: It depends. So, making this optionally seems to me to be the best approach.

Edit:
Another nice use case by the suggested approach (that was not immediately obvious to me) is:

User macro: {$PASSWORD} => :$K?%f/]_ O? Scenario variables: {password}={$PASSWORD} Step URL: https://example.com/login.html?usr=zabbix&pwd={encode:password}

I think that this solution is indeed a good one.
it would def be a working solution that will not break things.

Comment by dimir 2015 Oct 07

There is one problem. Currently it's allowed to have any character in variable names. I. e.

{foo:bar}
{foo|bar}
{foo,bar.baz}

are all supported. Probably the nicest solution would be to disallow those special symbols in variable names. But that would introduce a regression.

Comment by dimir 2015 Oct 07

Unfortunately we will have to wait at least until 3.0 with this issue unless someone has another idea how to fix this in a proper manner. But the general idea on encoding/decoding the variable when used in Get/Post should probably stay. E. g. that would even suit the need to send the variable in 2 ways: one as is and another encoded.

Comment by Aleksandrs Saveljevs 2015 Oct 07

There was an idea in the past (although it does not seem to be documented in JIRA) about using a syntax like the following for applying a function to a macro value, like so:

{$MACRO:md5}

This would apply md5() function to the value of {$MACRO} (note, however, that this syntax would not work, because after ZBXNEXT-2683 "md5" is treated a macro context).

We are probably not considering this idea anymore, but I am mentioning it just in case we decide to use syntax like {sessid:url_encode} for URL-encoding in Web scenarios.

Comment by dimir 2015 Oct 07

Is there any work being done on this issue? it still exists in 3.2.1 - should be added to "affected versions"

Comment by richlv 2016 Dec 21

tymik, there is no need to add all versions - it is assumed that the issue affects the version listed and all later versions (unless mentioned otherwise)

Comment by dimir 2017 Jan 18

One of the problems is import/export templates/hosts with web scenarios, exported from older versions, that would need to be adapted.

In the perfect world we think the solution would be to introduce RAW POST data and also add GET/POST sections where form variables are completely and always URL-encoded:

URL (no URL-encoding)
+---------------------------------+
| http://...&debug=1&foo={bar}    |
+---------------------------------+
GET (completely URL-encoded)
+----------+ +---------+
| user     | | {user}  |
+----------+ +---------+
+----------+ +---------+
| password | | pass^&c |
+----------+ +---------+
POST (completely URL-encoded)
+----------+ +---------+
| var1     | | {var1}  |
+----------+ +---------+
+----------+ +---------+
| var2     | | {var2}  |
+----------+ +---------+
POST RAW (no URL-encoding)
+---------------------------------+
| sessid=987sdf&debug=1&foo={bar} |
+---------------------------------+
            

I suggest to use the following "perfect world" solution:
Screenshots are provided as an example, not as a final solution (read as: I am not a designer).

  • GET variables are stored as key => value pairs:
  • If user enters URL containing query path (all the part of URL after "?"), part before "?" is saved as URL and GET params are parsed and stored as key => value pairs.
  • During update, parsing is performed (1.1) and data is stored in format described in 1.
  • Zabbix variables and macros are allowed in both Name and Value fields.
  • Validation can be introduced for cases when same GET variable exist in URL and in GET variable list.
  • POST variables are stored as key => value pairs or as RAW data (depending on user selection):
  • Existing installations can be migrated as if RAW data was selected.
  • Zabbix variables and macros are allowed in RAW data or in both Name and Value fields
  • Zabbix variables are stored as key => value pairs and are entered in the same format as GET / POST variables.
  • Variable selection can be implemented so there is no need to remember variable names ( {VAR}

    action link on screenshots).

  • Additional option can be introduced to select formatting of POST data in Form data format
  • Format as application/x-www-form-urlencoded
  • Format as multipart/form-data
  • During migration all existing data should be URL decoded.
  • Only not encoded values should be saved in database with one exception (RAW post data should be saved as is) so proper encoding can be applied in runtime.

    Comment by dimir 2017 Jan 20

    Probably not very good idea about migration or encoding all variables.
    You see that variables are:
    List of scenario-level variables (macros) that may be used in scenario steps (URL, Post variables).

    This means that I can do like this:

    {wholeurl}=http://localhost/zabbix/index.php

    After upgrade it will become:

    {wholeurl}=http%3A%2F%2Flocalhost%2Fzabbix%2Findex.php

    which is not very useful as it can't be resolved anymore.

    Comment by Vladislavs Sokurenko 2017 Feb 02

    (1) [D] Real life scenario from documentation must include urlencode as well as variables
    section
    Sample:

     id=2345&userid={{user}.urlencode()}  

    Also should be mentioned that variables declared with regex can be encoded in the same way.

    sasha Documentation already done under ZBXNEXT-3747.

    CLOSED

    Comment by dimir 2017 Feb 02

    I think the idea of vjaceslavs was to keep things simple for user. We are adding a new functionality and again not trying to make things easier for a user. Now I think it's 99% of cases where user needs his variables url-encoded, yet we are not url-encoding those by default. Basically, every time a user uses a macro he/she would have to add urlencode() to it. Most of the users probably even don't know what it is and why they should be adding it. The only thing where a user could need a clear variable is part of URL and for that case a user macro could be used IMO.

    vso This solution is very similar to other languages for example PHP and I think is very intuitive.
    From php manual:
    http://php.net/manual/en/function.urlencode.php

    $query_string = 'foo=' . urlencode($foo) . '&bar=' . urlencode($bar);

    Zabbix would be something like that

    foo={{foo}.urlencode()}&bar={{bar}.urlencode()}

    Also it's same syntax as macro functions:
    https://www.zabbix.com/documentation/3.4/manual/config/macros/macro_functions

    So I think if user is familiar with macro_functions or PHP or any other scripting language that has URL encode, then this solution will be very intuitive and expected.

    If user does not know what URL-encoding is and why they shall be adding it then they can read documentation about URL allowed symbols or zabbix documentation which will mention why to URL-encode.
    Creating web scenarios implies that user has some knowledge in this field, otherwise URL-encoding is the least of problems he might face.

    vjaceslavs Sadly, this kind of logic leads to "You must be an electrician to use our TV, because TV is an electrical device". And yes, user needs some basic knowledge, but it does not mean that we can't make user-friendly solution.

    <dimir> This is exactly the problem: we assume our users know programming languages like PHP.

    Comment by dimir 2017 Feb 02

    So, it won't be possible to send anything URL-encoded that is not defined in a macro?

    vjaceslavs There are two options you can use:

  • Define a variable (not a macro)
  • Encode value yourself (can be used even before this issue is resolved)
  • vso You can assign anything to variables.

    User macros

    {user}={$USER} {password}={$PASSWORD}

    Host level macros

    {user}={HOST.HOST}

    Value that you might like to encode

    {user}=&Günter {password}=&Günter

    Value that is already encoded

    {user}=%26G%C3%BCnter {password}=%26G%C3%BCnter

    Some URL part

    {wholeurl}=http://localhost/zabbix/index.php

    So, it won't be possible to send anything URL-encoded that is not defined in a scenario variable?

    vso What else would you like to encode ?

    <dimir> A string. But I do not want to define it in a variable.

    Look, there is a page I check, I know I need to send it a GET variable that contains '&' and I don't want to define it nowhere. Just admit that this is not possible.

    vso Encoding function is only applicable to variables.

    <dimir> Got it, thanks.

    Comment by dimir 2017 Feb 02

    vjaceslavs Use of regexp in web scenario configuration is not pointless as variable will get its value after first step. Typical use case would be:

  • Multiple steps
  • All steps except for the first contain some important value (like "sid" in zabbix)
  • To get this value (if any) from all steps it is much easier to specify single web scenario level variable than to copy the same variable over and over.

    WON'T FIX

    Comment by Vladislavs Sokurenko 2017 Feb 23

    (4) [PS] UTF-8 character encoding truncate string.

    in http_variable_urlencode source is signed char, so it can't handle UTF-8

    test string:
    &Günter

    Actual:
    %26G%

    Expected:
    %26G%C3%BCnter

    Furthermore it encodes in small hex digits, we should probably encode in big hex digits.
    Should also consider using curl_easy_escape() instead of new function.

    vjaceslavs RFC states that:

    The uppercase hexadecimal digits 'A' through 'F' are equivalent to the lowercase digits 'a' through 'f', respectively. If two URIs differ only in the case of hexadecimal digits used in percent-encoded octets, they are equivalent.

    But for consistency changed letters to uppercase. RESOLVED in r65926

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Feb 23

    (5) [PS] http_variable_urlencode always return SUCCEED and return code is never checked.

    For example this is prototype of curl for escaping

    CURL_EXTERN char *curl_easy_escape(CURL *handle, const char *string, int length);

    However zabbix function to do the same prototype is

    int http_variable_urlencode(const char *source, char **result)

    Where SUCCEED is always returned, it cannot fail.
    It should be made void or changed to return something useful.
    For example similar as curl_easy_escape but ofcourse CURL *handle and int length can be omitted.

    While at it please make sure that all operators are separated by space and function definition must not have 2 new lines before and after.

    strlen(source)*3

    Also probably this useful function is better to be located in str.c
    There are already similar functions for example:

    char *zbx_replace_utf8(const char *text)

    vjaceslavs Function is located where it is as it is the only place it is needed. It can be moved to other places if needed later. RESOLVED in r65927

    vso REOPENED

    httpmacro.c:194:6: error: conflicting types for ‘http_variable_urlencode’ void http_variable_urlencode(const char *source, char **result) In file included from httpmacro.c:25:0: httpmacro.h:46:5: note: previous declaration of ‘http_variable_urlencode’ was here int http_variable_urlencode(const char *source, char **result);

    (6) [PS] Suddenly =&=&= Is posted instead of real values.

    vjaceslavs Can you please provide a full test-case or use-case scenario to reproduce this problem?

    vso Sorry I am not that far in code investigation so I cannot tell why, but it suddenly stopped working, I will get back to you when there is more info.

    vso It looks like it was done by latest refactoring in http_variable_urlencode there can be same source and result.

    vjaceslavs Reverted the fix in r65933 RESOLVED

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Feb 23 16212:20170223:164700.698 cannot perform URL decode of '' part of url '%mypass' 16212:20170223:164700.698 FAIL *result (nil) 16212:20170223:164700.698 Got signal [signal:11(SIGSEGV),reason:1,refaddr:(nil)]. Crashing ... 16212:20170223:164700.698 ====== Fatal information: ====== 16212:20170223:164700.698 Program counter: 0x7fd178aeed16 16212:20170223:164700.698 === Registers: === Leave as it is, SUCCEED

    Please also consider using curl_easy_unescape function from cURL library

    vjaceslavs Fixed error in r65936. Malformed URL parts should not be considered as a valid input for web scenario steps so expected is FAIL. RESOLVED

    vso why is it malformed ? if we use curl_easy_unescape it will not show fail but just return same string silently.

    vjaceslavs It is malformed because RFC3986 states that:

    Because the percent ("%") character serves as the indicator for percent-encoded octets, it must be percent-encoded as "%25" for that octet to be used as data within a URI.

    Please refer to standart not the implementation of other libraries.

    For example, JS call decodeURIComponent('%mypass'); (solution used in zabbix frontend) will raise the exception URIError: URI malformed and I don't think that we need different behavior on server and frontend.

    vso CLOSED, also removed unused variables in r65945.

    Comment by Vladislavs Sokurenko 2017 Feb 24

    (8) http_substitute_variables() goes out of bounds on next iteration after urlencode(), resulting in undefined behavior.

    Variables

    {path_php}=php {path_frontends}=frontends http://localhost/vso/zabbix_eclipse_dev/ZBXNEXT-2074-2/{{path_frontends}.urldecode()}/{path_php}/

    There are problems with offset variable, it is only initialized when there is urlencode or some other function.

    vjaceslavs RESOLVED in r65943

    vso looks good, added small style fixes in r65946, please review and close

    vjaceslavs Thanks! CLOSED

    Comment by Vladislavs Sokurenko 2017 Feb 24

    (9) [S] Macros are not resolved in header, in scenario
    Those and always fail to find index.
    Furthermore there is no possibility to specify post fields in Scenario or query field but the code still try to encode those.
    httptest_load_pairs try to resolve macros in header, query field, post field, but it will never happen

    Macros are cleared after each httptest

    /* clear the macro cache used in this http test */ httptest_remove_macros(&httptest);

    So when we load pairs, we have empty macros

    But for some reason httptest_load_pairs code will try to resolve macros

    SUCCEED != (ret = http_substitute_variables(httptest, &key)) || SUCCEED != (ret = http_substitute_variables(httptest, &value))))

    It never succeed, since he will try to find a match in macros.
    This redundant code shall be removed if it serves no purpose or fixed.

    vjaceslavs RESOLVED in r65956

    vso This is good thanks, but what about query and post field, isn't it absent for scenario ?

    /* keys and values of query fields / post fields should be encoded */ if (ZBX_HTTPFIELD_QUERY_FIELD == type || ZBX_HTTPFIELD_POST_FIELD == type) http_variable_urlencode(key, &key); http_variable_urlencode(value, &value);

    vjaceslavs Missed that part. Thanks! RESOLVED in r65957

    vso looks good, please be so kind and review small style fixes in r65960, r65961, r65965 and close

    vjaceslavs Minor fix is made in r66184 just to make sure it is initialized. CLOSED

    Comment by Vladislavs Sokurenko 2017 Feb 24

    (10) [S] Variables in a step are not resolved.
    It is only possible to use variables that are defined in scenario.
    If variable is in step it cannot be used withing a step

    vjaceslavs This is a weird logic of initial solution. If I define a variable within web scenario step, then it gets resolved after execution of the step and can be used in a next step. I would like to change that, but I think this can cause regression in some cases. So WON'T FIX

    vso CLOSED, yes this is how it worked before.

    Comment by Vladislavs Sokurenko 2017 Feb 27

    vjaceslavs RESOLVED in r65987

    vso looks good, added small style fixes in r65990, please review and close

    vjaceslavs Thanks! CLOSED

    Comment by Vladislavs Sokurenko 2017 Feb 27

    vjaceslavs It is terrible idea to rely on UB. Thanks! RESOLVED in r65988

    vso looks good, added small style fix in r65992, please review and close

    vjaceslavs Thanks! CLOSED

    Comment by Vladislavs Sokurenko 2017 Feb 27 Details Error in query [SELECT ht.httptestid,ht.name,ht.applicationid,ht.delay,ht.status,ht.variables,ht.agent,ht.authentication,ht.http_user,ht.http_password,ht.http_proxy,ht.retries,ht.hostid,ht.templateid,ht.headers,ht.verify_peer,ht.verify_host,ht.ssl_cert_file,ht.ssl_key_file,ht.ssl_key_password FROM httptest ht WHERE ht.hostid='10106'] [Unknown column 'ht.variables' in 'field list'] Error in query [SELECT hs.httpstepid,hs.httptestid,hs.name,hs.no,hs.url,hs.timeout,hs.posts,hs.variables,hs.required,hs.status_codes,hs.headers,hs.follow_redirects,hs.retrieve_mode FROM httpstep hs WHERE 1=0] [Unknown column 'hs.variables' in 'field list']

    vjaceslavs RESOLVED in r66036

    vso REOPENED, There ought to be server changes, could you please be so kind and double check ?

    This below still references variables

    zbx_snprintf_alloc(&sql, &sql_alloc, &sql_offset, "select t.httptestid,t.name,t.applicationid,t.delay,t.status,t.variables,t.agent," "t.authentication,t.http_user,t.http_password,t.http_proxy,t.retries,h.httptestid"

    vjaceslavs RESOLVED in r66070

    vso REOPENED, template link crash.

    24715:20170301:142718.682 Starting Zabbix Server. Zabbix 3.3.0 (revision {ZABBIX_REVISION}). 24715:20170301:142718.682 ****** Enabled features ****** 24715:20170301:142718.682 SNMP monitoring: NO 24715:20170301:142718.682 IPMI monitoring: NO 24715:20170301:142718.682 Web monitoring: YES 24715:20170301:142718.682 VMware monitoring: YES 24715:20170301:142718.682 SMTP authentication: YES 24715:20170301:142718.682 Jabber notifications: NO 24715:20170301:142718.682 Ez Texting notifications: YES 24715:20170301:142718.682 ODBC: NO 24715:20170301:142718.682 SSH2 support: NO 24715:20170301:142718.682 IPv6 support: YES 24715:20170301:142718.682 TLS support: NO 24715:20170301:142718.682 ****************************** 24715:20170301:142718.682 using configuration file: /etc/zabbix/zabbix_server.conf 24715:20170301:142718.684 current database version (mandatory/optional): 03030038/03030038 24715:20170301:142718.684 required mandatory version: 03030038 24715:20170301:142718.689 server #0 started [main process] 24716:20170301:142718.689 server #1 started [configuration syncer #1] 24717:20170301:142718.689 server #2 started [db watchdog #1] 24718:20170301:142718.689 server #3 started [alerter #1] 24719:20170301:142718.689 server #4 started [housekeeper #1] 24720:20170301:142718.690 server #5 started [timer #1] 24721:20170301:142718.690 server #6 started [http poller #1] 24722:20170301:142718.690 server #7 started [discoverer #1] 24723:20170301:142718.690 server #8 started [history syncer #1] 24724:20170301:142718.690 server #9 started [history syncer #2] 24725:20170301:142718.690 server #10 started [history syncer #3] 24726:20170301:142718.691 server #11 started [history syncer #4] 24728:20170301:142718.691 server #13 started [proxy poller #1] 24727:20170301:142718.691 server #12 started [escalator #1] 24729:20170301:142718.691 server #14 started [self-monitoring #1] 24732:20170301:142718.691 server #15 started [task manager #1] 24734:20170301:142718.691 server #16 started [poller #1] 24736:20170301:142718.692 server #17 started [poller #2] 24737:20170301:142718.692 server #18 started [poller #3] 24739:20170301:142718.692 server #19 started [poller #4] 24741:20170301:142718.692 server #20 started [poller #5] 24743:20170301:142718.692 server #21 started [unreachable poller #1] 24745:20170301:142718.692 server #22 started [trapper #1] 24747:20170301:142718.692 server #23 started [trapper #2] 24749:20170301:142718.693 server #24 started [trapper #3] 24751:20170301:142718.693 server #25 started [trapper #4] 24753:20170301:142718.693 server #26 started [trapper #5] 24755:20170301:142718.693 server #27 started [icmp pinger #1] 24747:20170301:142720.213 In DBadd_interface() 24747:20170301:142720.213 End of DBadd_interface():3 24747:20170301:142720.223 In DBcopy_template_elements() 24747:20170301:142720.223 In validate_linked_templates() 24747:20170301:142720.224 End of validate_linked_templates():SUCCEED 24747:20170301:142720.224 In validate_host() 24747:20170301:142720.224 In validate_inventory_links() 24747:20170301:142720.224 End of validate_inventory_links():SUCCEED 24747:20170301:142720.224 In validate_httptests() 24747:20170301:142720.225 End of validate_httptests():SUCCEED 24747:20170301:142720.226 In validate_host():SUCCEED 24747:20170301:142720.227 In DBcopy_template_applications() 24747:20170301:142720.227 End of DBcopy_template_applications() 24747:20170301:142720.231 In DBcopy_template_application_prototypes() 24747:20170301:142720.232 End of DBcopy_template_application_prototypes() 24747:20170301:142720.232 In DBcopy_template_item_application_prototypes() 24747:20170301:142720.232 End of DBcopy_template_item_application_prototypes() 24747:20170301:142720.233 In DBcopy_template_triggers() 24747:20170301:142720.233 End of DBcopy_template_triggers():SUCCEED 24747:20170301:142720.233 In DBcopy_template_graphs() 24747:20170301:142720.234 End of DBcopy_template_graphs() 24747:20170301:142720.234 In DBcopy_template_httptests() 24747:20170301:142720.234 In DBget_httptests() 24747:20170301:142720.236 End of DBget_httptests() 24747:20170301:142720.237 Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x1]. Crashing ... 24747:20170301:142720.237 ====== Fatal information: ====== 24747:20170301:142720.237 Program counter: 0x4d947b 24747:20170301:142720.237 === Registers: === 24747:20170301:142720.237 r8 = 0 = 0 = 0 24747:20170301:142720.237 r9 = 1 = 1 = 1 24747:20170301:142720.237 r10 = 1e7afa0 = 31960992 = 31960992 24747:20170301:142720.237 r11 = 3 = 3 = 3 24747:20170301:142720.237 r12 = 1 = 1 = 1 24747:20170301:142720.237 r13 = 1 = 1 = 1 24747:20170301:142720.237 r14 = ffff = 65535 = 65535 24747:20170301:142720.237 r15 = ffff = 65535 = 65535 24747:20170301:142720.237 rdi = 1 = 1 = 1 24747:20170301:142720.237 rsi = ffff = 65535 = 65535 24747:20170301:142720.237 rbp = 7ffdab3cf720 = 140727476352800 = 140727476352800 24747:20170301:142720.237 rbx = 1 = 1 = 1 24747:20170301:142720.237 rdx = ffff = 65535 = 65535 24747:20170301:142720.237 rax = ffff = 65535 = 65535 24747:20170301:142720.237 rcx = 1 = 1 = 1 24747:20170301:142720.238 rsp = 7ffdab3cf6e0 = 140727476352736 = 140727476352736 24747:20170301:142720.238 rip = 4d947b = 5084283 = 5084283 24747:20170301:142720.238 efl = 10206 = 66054 = 66054 24747:20170301:142720.238 csgsfs = 33 = 51 = 51 24747:20170301:142720.238 err = 4 = 4 = 4 24747:20170301:142720.238 trapno = e = 14 = 14 24747:20170301:142720.238 oldmask = 0 = 0 = 0 24747:20170301:142720.238 cr2 = 1 = 1 = 1 24747:20170301:142720.238 === Backtrace: === 24747:20170301:142720.238 23: ./sbin/zabbix_server: trapper #2 [processing data](print_fatal_info+0xbd) [0x479a1d] 24747:20170301:142720.238 22: ./sbin/zabbix_server: trapper #2 [processing data]() [0x479cde] 24747:20170301:142720.238 21: /lib/x86_64-linux-gnu/libc.so.6(+0x354a0) [0x7fb8657b84a0] 24747:20170301:142720.238 20: ./sbin/zabbix_server: trapper #2 [processing data]() [0x4d947b] 24747:20170301:142720.238 19: ./sbin/zabbix_server: trapper #2 [processing data](zbx_db_dyn_escape_string+0x16) [0x4da126] 24747:20170301:142720.238 18: ./sbin/zabbix_server: trapper #2 [processing data](zbx_db_insert_add_values_dyn+0xd2) [0x4b6412] 24747:20170301:142720.238 17: ./sbin/zabbix_server: trapper #2 [processing data](zbx_db_insert_add_values+0x13a) [0x4b659a] 24747:20170301:142720.238 16: ./sbin/zabbix_server: trapper #2 [processing data](DBcopy_template_elements+0x165b) [0x4b229b] 24747:20170301:142720.238 15: ./sbin/zabbix_server: trapper #2 [processing data](op_template_add+0x5b) [0x418aeb] 24747:20170301:142720.238 14: ./sbin/zabbix_server: trapper #2 [processing data](process_actions+0xe1f) [0x417aff] 24747:20170301:142720.238 13: ./sbin/zabbix_server: trapper #2 [processing data]() [0x4194ff] 24747:20170301:142720.238 12: ./sbin/zabbix_server: trapper #2 [processing data](process_events+0x34) [0x41a6b4] 24747:20170301:142720.238 11: ./sbin/zabbix_server: trapper #2 [processing data](DBregister_host_flush+0x54d) [0x4b719d] 24747:20170301:142720.238 10: ./sbin/zabbix_server: trapper #2 [processing data](DBregister_host+0x6c) [0x4b73bc] 24747:20170301:142720.238 9: ./sbin/zabbix_server: trapper #2 [processing data]() [0x431e7b] 24747:20170301:142720.238 8: ./sbin/zabbix_server: trapper #2 [processing data](send_list_of_active_checks_json+0x176) [0x4325b6] 24747:20170301:142720.238 7: ./sbin/zabbix_server: trapper #2 [processing data]() [0x43037c] 24747:20170301:142720.238 6: ./sbin/zabbix_server: trapper #2 [processing data](trapper_thread+0x19a) [0x4309ba] 24747:20170301:142720.238 5: ./sbin/zabbix_server: trapper #2 [processing data](zbx_thread_start+0x45) [0x482805] 24747:20170301:142720.238 4: ./sbin/zabbix_server: trapper #2 [processing data](MAIN_ZABBIX_ENTRY+0x673) [0x41d663] 24747:20170301:142720.238 3: ./sbin/zabbix_server: trapper #2 [processing data](daemon_start+0x1c3) [0x4792a3] 24747:20170301:142720.238 2: ./sbin/zabbix_server: trapper #2 [processing data](main+0x3b4) [0x414ec4] 24747:20170301:142720.238 1: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fb8657a3830] 24747:20170301:142720.238 0: ./sbin/zabbix_server: trapper #2 [processing data](_start+0x29) [0x415199] 24747:20170301:142720.238 === Memory map: === 24747:20170301:142720.238 00400000-00589000 r-xp 00000000 08:02 11012379 /home/vso/zabbix_eclipse_dev/ZBXNEXT-2074-2/sbin/zabbix_server 24747:20170301:142720.238 00788000-00789000 r--p 00188000 08:02 11012379 /home/vso/zabbix_eclipse_dev/ZBXNEXT-2074-2/sbin/zabbix_server 24747:20170301:142720.238 00789000-00790000 rw-p 00189000 08:02 11012379 /home/vso/zabbix_eclipse_dev/ZBXNEXT-2074-2/sbin/zabbix_server 24747:20170301:142720.238 00790000-00797000 rw-p 00000000 00:00 0 24747:20170301:142720.238 01e61000-01ed5000 rw-p 00000000 00:00 0 [heap] 24747:20170301:142720.238 7fb85c259000-7fb85c264000 r-xp 00000000 08:02 4461030 /lib/x86_64-linux-gnu/libnss_files-2.23.so 24747:20170301:142720.238 7fb85c264000-7fb85c463000 ---p 0000b000 08:02 4461030 /lib/x86_64-linux-gnu/libnss_files-2.23.so 24747:20170301:142720.238 7fb85c463000-7fb85c464000 r--p 0000a000 08:02 4461030 /lib/x86_64-linux-gnu/libnss_files-2.23.so 24747:20170301:142720.238 7fb85c464000-7fb85c465000 rw-p 0000b000 08:02 4461030 /lib/x86_64-linux-gnu/libnss_files-2.23.so 24747:20170301:142720.238 7fb85c465000-7fb85c46b000 rw-p 00000000 00:00 0 24747:20170301:142720.238 7fb85c46b000-7fb85cc6b000 rw-s 00000000 00:05 48660530 /SYSV76020d87 (deleted) 24747:20170301:142720.238 7fb85cc6b000-7fb85d338000 rw-s 00000000 00:05 48562221 /SYSV67020d87 (deleted) 24747:20170301:142720.238 7fb85d338000-7fb85d738000 rw-s 00000000 00:05 48529452 /SYSV74020d87 (deleted) 24747:20170301:142720.238 7fb85d738000-7fb85db38000 rw-s 00000000 00:05 48496677 /SYSV48020d87 (deleted) 24747:20170301:142720.239 7fb85db38000-7fb85eb38000 rw-s 00000000 00:05 48463907 /SYSV68020d87 (deleted) 24747:20170301:142720.239 7fb85eb38000-7fb85eb41000 r-xp 00000000 08:02 4460941 /lib/x86_64-linux-gnu/libcrypt-2.23.so 24747:20170301:142720.239 7fb85eb41000-7fb85ed40000 ---p 00009000 08:02 4460941 /lib/x86_64-linux-gnu/libcrypt-2.23.so 24747:20170301:142720.239 7fb85ed40000-7fb85ed41000 r--p 00008000 08:02 4460941 /lib/x86_64-linux-gnu/libcrypt-2.23.so 24747:20170301:142720.239 7fb85ed41000-7fb85ed42000 rw-p 00009000 08:02 4460941 /lib/x86_64-linux-gnu/libcrypt-2.23.so 24747:20170301:142720.239 7fb85ed42000-7fb85ed70000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb85ed70000-7fb85ee3f000 r-xp 00000000 08:02 14165018 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 24747:20170301:142720.239 7fb85ee3f000-7fb85f03f000 ---p 000cf000 08:02 14165018 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 24747:20170301:142720.239 7fb85f03f000-7fb85f042000 r--p 000cf000 08:02 14165018 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 24747:20170301:142720.239 7fb85f042000-7fb85f044000 rw-p 000d2000 08:02 14165018 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 24747:20170301:142720.239 7fb85f044000-7fb85f045000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb85f045000-7fb85f08b000 r-xp 00000000 08:02 14164557 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0 24747:20170301:142720.239 7fb85f08b000-7fb85f28b000 ---p 00046000 08:02 14164557 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0 24747:20170301:142720.239 7fb85f28b000-7fb85f28d000 r--p 00046000 08:02 14164557 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0 24747:20170301:142720.239 7fb85f28d000-7fb85f28f000 rw-p 00048000 08:02 14164557 /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0 24747:20170301:142720.239 7fb85f28f000-7fb85f290000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb85f290000-7fb85f29e000 r-xp 00000000 08:02 14164539 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0 24747:20170301:142720.239 7fb85f29e000-7fb85f49d000 ---p 0000e000 08:02 14164539 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0 24747:20170301:142720.239 7fb85f49d000-7fb85f49e000 r--p 0000d000 08:02 14164539 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0 24747:20170301:142720.239 7fb85f49e000-7fb85f49f000 rw-p 0000e000 08:02 14164539 /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0 24747:20170301:142720.239 7fb85f49f000-7fb85f4c6000 r-xp 00000000 08:02 14165183 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0 24747:20170301:142720.239 7fb85f4c6000-7fb85f6c6000 ---p 00027000 08:02 14165183 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0 24747:20170301:142720.239 7fb85f6c6000-7fb85f6c7000 r--p 00027000 08:02 14165183 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0 24747:20170301:142720.239 7fb85f6c7000-7fb85f6c8000 rw-p 00028000 08:02 14165183 /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0 24747:20170301:142720.239 7fb85f6c8000-7fb85f6dd000 r-xp 00000000 08:02 14164936 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0 24747:20170301:142720.239 7fb85f6dd000-7fb85f8dc000 ---p 00015000 08:02 14164936 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0 24747:20170301:142720.239 7fb85f8dc000-7fb85f8dd000 r--p 00014000 08:02 14164936 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0 24747:20170301:142720.239 7fb85f8dd000-7fb85f8de000 rw-p 00015000 08:02 14164936 /usr/lib/x86_64-linux-gnu/libroken.so.18.1.0 24747:20170301:142720.239 7fb85f8de000-7fb85f90e000 r-xp 00000000 08:02 14164537 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0 24747:20170301:142720.239 7fb85f90e000-7fb85fb0e000 ---p 00030000 08:02 14164537 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0 24747:20170301:142720.239 7fb85fb0e000-7fb85fb0f000 r--p 00030000 08:02 14164537 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0 24747:20170301:142720.239 7fb85fb0f000-7fb85fb10000 rw-p 00031000 08:02 14164537 /usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0 24747:20170301:142720.239 7fb85fb10000-7fb85fb11000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb85fb11000-7fb85fbb0000 r-xp 00000000 08:02 14163981 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0 24747:20170301:142720.239 7fb85fbb0000-7fb85fdaf000 ---p 0009f000 08:02 14163981 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0 24747:20170301:142720.239 7fb85fdaf000-7fb85fdb0000 r--p 0009e000 08:02 14163981 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0 24747:20170301:142720.239 7fb85fdb0000-7fb85fdb3000 rw-p 0009f000 08:02 14163981 /usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0 24747:20170301:142720.239 7fb85fdb3000-7fb85fe37000 r-xp 00000000 08:02 14164633 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0 24747:20170301:142720.239 7fb85fe37000-7fb860036000 ---p 00084000 08:02 14164633 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0 24747:20170301:142720.239 7fb860036000-7fb860039000 r--p 00083000 08:02 14164633 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0 24747:20170301:142720.239 7fb860039000-7fb86003c000 rw-p 00086000 08:02 14164633 /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0 24747:20170301:142720.239 7fb86003c000-7fb86003d000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb86003d000-7fb860045000 r-xp 00000000 08:02 14164541 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0 24747:20170301:142720.239 7fb860045000-7fb860244000 ---p 00008000 08:02 14164541 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0 24747:20170301:142720.239 7fb860244000-7fb860245000 r--p 00007000 08:02 14164541 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0 24747:20170301:142720.239 7fb860245000-7fb860246000 rw-p 00008000 08:02 14164541 /usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0 24747:20170301:142720.239 7fb860246000-7fb860249000 r-xp 00000000 08:02 4460992 /lib/x86_64-linux-gnu/libkeyutils.so.1.5 24747:20170301:142720.239 7fb860249000-7fb860448000 ---p 00003000 08:02 4460992 /lib/x86_64-linux-gnu/libkeyutils.so.1.5 24747:20170301:142720.239 7fb860448000-7fb860449000 r--p 00002000 08:02 4460992 /lib/x86_64-linux-gnu/libkeyutils.so.1.5 24747:20170301:142720.239 7fb860449000-7fb86044a000 rw-p 00003000 08:02 4460992 /lib/x86_64-linux-gnu/libkeyutils.so.1.5 24747:20170301:142720.239 7fb86044a000-7fb860451000 r-xp 00000000 08:02 14164274 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 24747:20170301:142720.239 7fb860451000-7fb860650000 ---p 00007000 08:02 14164274 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 24747:20170301:142720.239 7fb860650000-7fb860651000 r--p 00006000 08:02 14164274 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 24747:20170301:142720.239 7fb860651000-7fb860652000 rw-p 00007000 08:02 14164274 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 24747:20170301:142720.239 7fb860652000-7fb86068f000 r-xp 00000000 08:02 14164462 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0 24747:20170301:142720.239 7fb86068f000-7fb86088f000 ---p 0003d000 08:02 14164462 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0 24747:20170301:142720.239 7fb86088f000-7fb860890000 r--p 0003d000 08:02 14164462 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0 24747:20170301:142720.239 7fb860890000-7fb860892000 rw-p 0003e000 08:02 14164462 /usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0 24747:20170301:142720.239 7fb860892000-7fb860893000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb860893000-7fb8608ac000 r-xp 00000000 08:02 14164963 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25 24747:20170301:142720.239 7fb8608ac000-7fb860aac000 ---p 00019000 08:02 14164963 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25 24747:20170301:142720.239 7fb860aac000-7fb860aad000 r--p 00019000 08:02 14164963 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25 24747:20170301:142720.239 7fb860aad000-7fb860aae000 rw-p 0001a000 08:02 14164963 /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25 24747:20170301:142720.239 7fb860aae000-7fb860ab8000 r-xp 00000000 08:02 14164637 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 24747:20170301:142720.239 7fb860ab8000-7fb860cb7000 ---p 0000a000 08:02 14164637 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 24747:20170301:142720.239 7fb860cb7000-7fb860cb8000 r--p 00009000 08:02 14164637 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 24747:20170301:142720.239 7fb860cb8000-7fb860cb9000 rw-p 0000a000 08:02 14164637 /usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1 24747:20170301:142720.239 7fb860cb9000-7fb860cbc000 r-xp 00000000 08:02 4460940 /lib/x86_64-linux-gnu/libcom_err.so.2.1 24747:20170301:142720.239 7fb860cbc000-7fb860ebb000 ---p 00003000 08:02 4460940 /lib/x86_64-linux-gnu/libcom_err.so.2.1 24747:20170301:142720.239 7fb860ebb000-7fb860ebc000 r--p 00002000 08:02 4460940 /lib/x86_64-linux-gnu/libcom_err.so.2.1 24747:20170301:142720.239 7fb860ebc000-7fb860ebd000 rw-p 00003000 08:02 4460940 /lib/x86_64-linux-gnu/libcom_err.so.2.1 24747:20170301:142720.239 7fb860ebd000-7fb860ee9000 r-xp 00000000 08:02 14164629 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 24747:20170301:142720.239 7fb860ee9000-7fb8610e8000 ---p 0002c000 08:02 14164629 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 24747:20170301:142720.239 7fb8610e8000-7fb8610ea000 r--p 0002b000 08:02 14164629 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 24747:20170301:142720.239 7fb8610ea000-7fb8610eb000 rw-p 0002d000 08:02 14164629 /usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1 24747:20170301:142720.239 7fb8610eb000-7fb8610ec000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb8610ec000-7fb8611af000 r-xp 00000000 08:02 14164635 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 24747:20170301:142720.239 7fb8611af000-7fb8613af000 ---p 000c3000 08:02 14164635 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 24747:20170301:142720.239 7fb8613af000-7fb8613bc000 r--p 000c3000 08:02 14164635 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 24747:20170301:142720.239 7fb8613bc000-7fb8613be000 rw-p 000d0000 08:02 14164635 /usr/lib/x86_64-linux-gnu/libkrb5.so.3.3 24747:20170301:142720.239 7fb8613be000-7fb8613cf000 r-xp 00000000 08:02 14165035 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1 24747:20170301:142720.239 7fb8613cf000-7fb8615cf000 ---p 00011000 08:02 14165035 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1 24747:20170301:142720.239 7fb8615cf000-7fb8615d0000 r--p 00011000 08:02 14165035 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1 24747:20170301:142720.239 7fb8615d0000-7fb8615d1000 rw-p 00012000 08:02 14165035 /usr/lib/x86_64-linux-gnu/libtasn1.so.6.5.1 24747:20170301:142720.239 7fb8615d1000-7fb86162a000 r-xp 00000000 08:02 14155987 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0 24747:20170301:142720.239 7fb86162a000-7fb861829000 ---p 00059000 08:02 14155987 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0 24747:20170301:142720.239 7fb861829000-7fb861833000 r--p 00058000 08:02 14155987 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0 24747:20170301:142720.239 7fb861833000-7fb861835000 rw-p 00062000 08:02 14155987 /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.1.0 24747:20170301:142720.239 7fb861835000-7fb8618b4000 r-xp 00000000 08:02 14164407 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 24747:20170301:142720.239 7fb8618b4000-7fb861ab3000 ---p 0007f000 08:02 14164407 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 24747:20170301:142720.239 7fb861ab3000-7fb861ab4000 r--p 0007e000 08:02 14164407 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 24747:20170301:142720.239 7fb861ab4000-7fb861ab5000 rw-p 0007f000 08:02 14164407 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 24747:20170301:142720.239 7fb861ab5000-7fb861ae7000 r-xp 00000000 08:02 14160909 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2 24747:20170301:142720.239 7fb861ae7000-7fb861ce6000 ---p 00032000 08:02 14160909 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2 24747:20170301:142720.239 7fb861ce6000-7fb861ce7000 r--p 00031000 08:02 14160909 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2 24747:20170301:142720.239 7fb861ce7000-7fb861ce8000 rw-p 00032000 08:02 14160909 /usr/lib/x86_64-linux-gnu/libhogweed.so.4.2 24747:20170301:142720.239 7fb861ce8000-7fb86359e000 r-xp 00000000 08:02 14164569 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 24747:20170301:142720.239 7fb86359e000-7fb86379d000 ---p 018b6000 08:02 14164569 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 24747:20170301:142720.239 7fb86379d000-7fb86379e000 r--p 018b5000 08:02 14164569 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 24747:20170301:142720.239 7fb86379e000-7fb86379f000 rw-p 018b6000 08:02 14164569 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1 24747:20170301:142720.239 7fb86379f000-7fb8637ec000 r-xp 00000000 08:02 14164648 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5 24747:20170301:142720.239 7fb8637ec000-7fb8639eb000 ---p 0004d000 08:02 14164648 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5 24747:20170301:142720.239 7fb8639eb000-7fb8639ed000 r--p 0004c000 08:02 14164648 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5 24747:20170301:142720.239 7fb8639ed000-7fb8639ee000 rw-p 0004e000 08:02 14164648 /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2.10.5 24747:20170301:142720.239 7fb8639ee000-7fb8639f0000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb8639f0000-7fb8639fd000 r-xp 00000000 08:02 14164643 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5 24747:20170301:142720.239 7fb8639fd000-7fb863bfd000 ---p 0000d000 08:02 14164643 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5 24747:20170301:142720.239 7fb863bfd000-7fb863bfe000 r--p 0000d000 08:02 14164643 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5 24747:20170301:142720.239 7fb863bfe000-7fb863bff000 rw-p 0000e000 08:02 14164643 /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2.10.5 24747:20170301:142720.239 7fb863bff000-7fb863c46000 r-xp 00000000 08:02 14164464 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 24747:20170301:142720.239 7fb863c46000-7fb863e45000 ---p 00047000 08:02 14164464 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 24747:20170301:142720.239 7fb863e45000-7fb863e47000 r--p 00046000 08:02 14164464 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 24747:20170301:142720.239 7fb863e47000-7fb863e49000 rw-p 00048000 08:02 14164464 /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 24747:20170301:142720.239 7fb863e49000-7fb863f6c000 r-xp 00000000 08:02 14155958 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2 24747:20170301:142720.239 7fb863f6c000-7fb86416b000 ---p 00123000 08:02 14155958 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2 24747:20170301:142720.239 7fb86416b000-7fb864176000 r--p 00122000 08:02 14155958 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2 24747:20170301:142720.239 7fb864176000-7fb864178000 rw-p 0012d000 08:02 14155958 /usr/lib/x86_64-linux-gnu/libgnutls.so.30.6.2 24747:20170301:142720.239 7fb864178000-7fb864179000 rw-p 00000000 00:00 0 24747:20170301:142720.239 7fb864179000-7fb8641ad000 r-xp 00000000 08:02 14164542 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2 24747:20170301:142720.239 7fb8641ad000-7fb8643ac000 ---p 00034000 08:02 14164542 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2 24747:20170301:142720.239 7fb8643ac000-7fb8643ae000 r--p 00033000 08:02 14164542 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2 24747:20170301:142720.239 7fb8643ae000-7fb8643af000 rw-p 00035000 08:02 14164542 /usr/lib/x86_64-linux-gnu/libnettle.so.6.2 24747:20170301:142720.239 7fb8643af000-7fb8643ca000 r-xp 00000000 08:02 14164944 /usr/lib/x86_64-linux-gnu/librtmp.so.1 24747:20170301:142720.239 7fb8643ca000-7fb8645c9000 ---p 0001b000 08:02 14164944 /usr/lib/x86_64-linux-gnu/librtmp.so.1 24747:20170301:142720.239 7fb8645c9000-7fb8645ca000 r--p 0001a000 08:02 14164944 /usr/lib/x86_64-linux-gnu/librtmp.so.1 24747:20170301:142720.239 7fb8645ca000-7fb8645cb000 rw-p 0001b000 08:02 14164944 /usr/lib/x86_64-linux-gnu/librtmp.so.1 24747:20170301:142720.239 7fb8645cb000-7fb8645fc000 r-xp 00000000 08:02 14156253 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15 24747:20170301:142720.239 7fb8645fc000-7fb8647fc000 ---p 00031000 08:02 14156253 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15 24747:20170301:142720.239 7fb8647fc000-7fb8647fd000 r--p 00031000 08:02 14156253 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15 24747:20170301:142720.239 7fb8647fd000-7fb8647fe000 rw-p 00032000 08:02 14156253 /usr/lib/x86_64-linux-gnu/libidn.so.11.6.15 24747:20170301:142720.239 7fb8647fe000-7fb86481f000 r-xp 00000000 08:02 4460998 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 24747:20170301:142720.239 7fb86481f000-7fb864a1e000 ---p 00021000 08:02 4460998 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 24747:20170301:142720.240 7fb864a1e000-7fb864a1f000 r--p 00020000 08:02 4460998 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 24747:20170301:142720.240 7fb864a1f000-7fb864a20000 rw-p 00021000 08:02 4460998 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 24747:20170301:142720.240 7fb864a20000-7fb864b9f000 r-xp 00000000 08:02 14164583 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 24747:20170301:142720.240 7fb864b9f000-7fb864d9f000 ---p 0017f000 08:02 14164583 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 24747:20170301:142720.240 7fb864d9f000-7fb864daf000 r--p 0017f000 08:02 14164583 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 24747:20170301:142720.240 7fb864daf000-7fb864db0000 rw-p 0018f000 08:02 14164583 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1 24747:20170301:142720.240 7fb864db0000-7fb864db4000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb864db4000-7fb864dca000 r-xp 00000000 08:02 4460969 /lib/x86_64-linux-gnu/libgcc_s.so.1 24747:20170301:142720.240 7fb864dca000-7fb864fc9000 ---p 00016000 08:02 4460969 /lib/x86_64-linux-gnu/libgcc_s.so.1 24747:20170301:142720.240 7fb864fc9000-7fb864fca000 rw-p 00015000 08:02 4460969 /lib/x86_64-linux-gnu/libgcc_s.so.1 24747:20170301:142720.240 7fb864fca000-7fb86513c000 r-xp 00000000 08:02 14158252 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 24747:20170301:142720.240 7fb86513c000-7fb86533c000 ---p 00172000 08:02 14158252 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 24747:20170301:142720.240 7fb86533c000-7fb865346000 r--p 00172000 08:02 14158252 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 24747:20170301:142720.240 7fb865346000-7fb865348000 rw-p 0017c000 08:02 14158252 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 24747:20170301:142720.240 7fb865348000-7fb86534c000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb86534c000-7fb865364000 r-xp 00000000 08:02 4461077 /lib/x86_64-linux-gnu/libpthread-2.23.so 24747:20170301:142720.240 7fb865364000-7fb865563000 ---p 00018000 08:02 4461077 /lib/x86_64-linux-gnu/libpthread-2.23.so 24747:20170301:142720.240 7fb865563000-7fb865564000 r--p 00017000 08:02 4461077 /lib/x86_64-linux-gnu/libpthread-2.23.so 24747:20170301:142720.240 7fb865564000-7fb865565000 rw-p 00018000 08:02 4461077 /lib/x86_64-linux-gnu/libpthread-2.23.so 24747:20170301:142720.240 7fb865565000-7fb865569000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb865569000-7fb865582000 r-xp 00000000 08:02 4461122 /lib/x86_64-linux-gnu/libz.so.1.2.8 24747:20170301:142720.240 7fb865582000-7fb865781000 ---p 00019000 08:02 4461122 /lib/x86_64-linux-gnu/libz.so.1.2.8 24747:20170301:142720.240 7fb865781000-7fb865782000 r--p 00018000 08:02 4461122 /lib/x86_64-linux-gnu/libz.so.1.2.8 24747:20170301:142720.240 7fb865782000-7fb865783000 rw-p 00019000 08:02 4461122 /lib/x86_64-linux-gnu/libz.so.1.2.8 24747:20170301:142720.240 7fb865783000-7fb865943000 r-xp 00000000 08:02 4460931 /lib/x86_64-linux-gnu/libc-2.23.so 24747:20170301:142720.240 7fb865943000-7fb865b42000 ---p 001c0000 08:02 4460931 /lib/x86_64-linux-gnu/libc-2.23.so 24747:20170301:142720.240 7fb865b42000-7fb865b46000 r--p 001bf000 08:02 4460931 /lib/x86_64-linux-gnu/libc-2.23.so 24747:20170301:142720.240 7fb865b46000-7fb865b48000 rw-p 001c3000 08:02 4460931 /lib/x86_64-linux-gnu/libc-2.23.so 24747:20170301:142720.240 7fb865b48000-7fb865b4c000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb865b4c000-7fb865b63000 r-xp 00000000 08:02 4461083 /lib/x86_64-linux-gnu/libresolv-2.23.so 24747:20170301:142720.240 7fb865b63000-7fb865d63000 ---p 00017000 08:02 4461083 /lib/x86_64-linux-gnu/libresolv-2.23.so 24747:20170301:142720.240 7fb865d63000-7fb865d64000 r--p 00017000 08:02 4461083 /lib/x86_64-linux-gnu/libresolv-2.23.so 24747:20170301:142720.240 7fb865d64000-7fb865d65000 rw-p 00018000 08:02 4461083 /lib/x86_64-linux-gnu/libresolv-2.23.so 24747:20170301:142720.240 7fb865d65000-7fb865d67000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb865d67000-7fb865d6a000 r-xp 00000000 08:02 4460955 /lib/x86_64-linux-gnu/libdl-2.23.so 24747:20170301:142720.240 7fb865d6a000-7fb865f69000 ---p 00003000 08:02 4460955 /lib/x86_64-linux-gnu/libdl-2.23.so 24747:20170301:142720.240 7fb865f69000-7fb865f6a000 r--p 00002000 08:02 4460955 /lib/x86_64-linux-gnu/libdl-2.23.so 24747:20170301:142720.240 7fb865f6a000-7fb865f6b000 rw-p 00003000 08:02 4460955 /lib/x86_64-linux-gnu/libdl-2.23.so 24747:20170301:142720.240 7fb865f6b000-7fb866073000 r-xp 00000000 08:02 4461001 /lib/x86_64-linux-gnu/libm-2.23.so 24747:20170301:142720.240 7fb866073000-7fb866272000 ---p 00108000 08:02 4461001 /lib/x86_64-linux-gnu/libm-2.23.so 24747:20170301:142720.240 7fb866272000-7fb866273000 r--p 00107000 08:02 4461001 /lib/x86_64-linux-gnu/libm-2.23.so 24747:20170301:142720.240 7fb866273000-7fb866274000 rw-p 00108000 08:02 4461001 /lib/x86_64-linux-gnu/libm-2.23.so 24747:20170301:142720.240 7fb866274000-7fb8662dd000 r-xp 00000000 08:02 14166919 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0 24747:20170301:142720.240 7fb8662dd000-7fb8664dd000 ---p 00069000 08:02 14166919 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0 24747:20170301:142720.240 7fb8664dd000-7fb8664e0000 r--p 00069000 08:02 14166919 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0 24747:20170301:142720.240 7fb8664e0000-7fb8664e1000 rw-p 0006c000 08:02 14166919 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0 24747:20170301:142720.240 7fb8664e1000-7fb866690000 r-xp 00000000 08:02 14165279 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3 24747:20170301:142720.240 7fb866690000-7fb866890000 ---p 001af000 08:02 14165279 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3 24747:20170301:142720.240 7fb866890000-7fb866898000 r--p 001af000 08:02 14165279 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3 24747:20170301:142720.240 7fb866898000-7fb86689a000 rw-p 001b7000 08:02 14165279 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3 24747:20170301:142720.240 7fb86689a000-7fb86689b000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb86689b000-7fb866c2e000 r-xp 00000000 08:02 14156693 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.4 24747:20170301:142720.240 7fb866c2e000-7fb866e2d000 ---p 00393000 08:02 14156693 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.4 24747:20170301:142720.240 7fb866e2d000-7fb866e33000 r--p 00392000 08:02 14156693 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.4 24747:20170301:142720.240 7fb866e33000-7fb866ea6000 rw-p 00398000 08:02 14156693 /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.4 24747:20170301:142720.240 7fb866ea6000-7fb866eab000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb866eab000-7fb866ed1000 r-xp 00000000 08:02 4460903 /lib/x86_64-linux-gnu/ld-2.23.so 24747:20170301:142720.240 7fb866f66000-7fb86709a000 rw-s 00000000 00:05 48594991 /SYSV73020d87 (deleted) 24747:20170301:142720.240 7fb86709a000-7fb8670b0000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb8670cc000-7fb8670ce000 rw-s 00000000 00:05 48627761 /SYSV53020d87 (deleted) 24747:20170301:142720.240 7fb8670ce000-7fb8670d0000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7fb8670d0000-7fb8670d1000 r--p 00025000 08:02 4460903 /lib/x86_64-linux-gnu/ld-2.23.so 24747:20170301:142720.240 7fb8670d1000-7fb8670d2000 rw-p 00026000 08:02 4460903 /lib/x86_64-linux-gnu/ld-2.23.so 24747:20170301:142720.240 7fb8670d2000-7fb8670d3000 rw-p 00000000 00:00 0 24747:20170301:142720.240 7ffdab3be000-7ffdab3eb000 rw-p 00000000 00:00 0 [stack] 24747:20170301:142720.240 7ffdab3eb000-7ffdab3ed000 r--p 00000000 00:00 0 [vvar] 24747:20170301:142720.240 7ffdab3ed000-7ffdab3ef000 r-xp 00000000 00:00 0 [vdso] 24747:20170301:142720.240 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] 24747:20170301:142720.240 ================================ 24747:20170301:142720.240 Please consider attaching a disassembly listing to your bug report. 24747:20170301:142720.240 This listing can be produced with, e.g., objdump -DSswx zabbix_server. 24747:20170301:142720.240 ================================ 24715:20170301:142720.241 One child process died (PID:24747,exitcode/signal:1). Exiting ... 24715:20170301:142722.246 syncing history data... 24715:20170301:142722.246 syncing history data done 24715:20170301:142722.246 syncing trend data... 24715:20170301:142722.246 syncing trend data done 24715:20170301:142722.246 Zabbix Server stopped. Zabbix 3.3.0 (revision {ZABBIX_REVISION}).

    vjaceslavs Sorry, commited code before merge from latest dev version. RESOLVED in r66082

    vso REOPENED Out of bounds row is selected resulting in undefined behavior

    ZBX_DBROW2UINT64(httptest->httptestid, row[12]);

    vjaceslavs RESOLVED in r66086

    vso Thanks ! one more thing could you please double check
    It looks like this id is retrieved but is not used.

    ZBX_STR2UINT64(httpfield->id, row[0]);

    vjaceslavs Thanks! Removed unused structure field and unused code. RESOLVED in r66093

    vso CLOSED, thanks !

    Comment by Vladislavs Sokurenko 2017 Feb 28 select use zabbixproxy Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select name, value, type from httptest_field; Empty set (0,01 sec)

    vjaceslavs RESOLVED in r66045

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 01

    (16) It looks like it was a bug before but follow_redirects and retrieve_mode is not copied from templates.

    This is select to copy template

    "select httpstepid,httptestid,name,no,url,timeout,posts,required,status_codes,post_type" " from httpstep"

    This is select when performing test

    "select httpstepid,no,name,url,timeout,posts,required,status_codes,post_type,follow_redirects," "retrieve_mode" " from httpstep"

    vjaceslavs If this is an existing bug, this should be moved to separate issue so it can be fixed not only in trunk.

    vjaceslavs headers are not copied from templates in older versions. Moved into a separate issue ZBX-11878. CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 02

    while at it, please also check consistency with other code.
    strcat() is used instead of zbx functions
    DBselect() is used with big letters
    DBfree_result() is right after closing bracket in all other similar places

    vjaceslavs Replaced strcat with zbx analogues, replaced uppercase with lowercase (not sure if it was needed) and moved DBfree_result a bit closer to the bracket (now there are 17 places with extra new line and 213 without it, so we are one step closer) RESOLVED in r66111

    vso tested, added small style fixes in r66162, please review and close

    vjaceslavs Thanks! CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 02

    (18) Double URL encode is possible if encoding post or query parameters through .urlencode()

    Steps:
    Scenario level variables

    {sign_in}=Sign in enter={{sign_in}.urlencode()}

    Actual:
    Double encoded

    enter=Sign%2520in

    Expected:
    Decision should be made but probably should be mutually exclusive. Same apply for decode, it will decode but later encode anyway, not sure that it's useful or only cause confusion.

    enter=Sign%20in

    vjaceslavs There are multiple use cases when it is needed. Macro functions are only a tool, so you can't blame the tool for all the bad things you can do with it. WON'T FIX

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 06

    (19) Variable is not initialized, resulting in undefined behavior.

    It looks like variables should be initialized.

    /* variables defined in scenario */ if (NULL == err_str && FAIL == http_process_variables(httptest, &httptest->variables, page.data, &var_err_str)) char *variables; size_t alloc_len = 0, offset;

    vjaceslavs RESOLVED in r66163, minor style fixes in r66164

    vso tested, with small style fixes in r66165, please review and close

    vjaceslavs Thanks! CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 06

    (20) This is very minor, but if http_substitute_variables() fails on header, variable, post field or query field then step fails.
    However if http_substitute_variables() fails on URL, or raw post then it is ignored.

    vjaceslavs I would say that this is a good place where refactoring is required. In introduced function I added checks. Existing function lack those checks (for example, results of substitute_simple_macros are not checked). To make code consistant there multiple decisions / changes should be made. So for now on (until there are no common approach on handling filelds) this subtask is being marked as WON'T FIX

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 06

    (21) Consistency with other code.

    In punycode_encode_codepoints() uses goto statements right to the return statement, if goto serve no purpose of cleaning something then why not exit immediately instead.

    In punycode_encode Are we allowed to use variable length arrays ? It is not consistent with other code.

    const size_t length = 2048; char buffer[length];

    Same with uint32_t better to use zbx_uint32_t

    vjaceslavs Not sure how to comment this as there are three things.
    About goto. It is used to save constancy - return is in the end. If you think, that this is bad and should be fixed, then I propose to fix it in other places too and to make it a part of coding standart. Other places are:

    comms.c [1457:3] cfg.c [298:3] db.c [206:3] dbconfig.c [7927:3] [8025:3] [8191:4] valuecache.c [405:3] [1658:3] [2000:3] [2064:3] [2634:3] proxy.c [2625:3] template_item.c [400:3] email.c [245:3] [357:3] [684:3] ipcservice.c [513:3] zbxregexp.c [194:3] [289:3] file.c [60:3] [104:3] [144:3] cpustat.c [805:3] logfiles.c [605:3] [1806:3] zabbix_sender.c [109:3] vmware.c [1479:3] [4522:3] [4629:3] ---------------------------------------------------------------- httptest.c [624:3]

    About variable length arrays. Not sure that this is the case when it can be called an VLA, but replaced const length with a MAX_STRING_LEN.

    Fixed types to zbx_uint32_t.

    RESOLVED in r66182

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 06

    (22) It's a convention that new fields shall be added at the end.
    post_type is last in table when upgrading but is not last when making clean install.

    vjaceslavs RESOLVED in r66177

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 06

    (23) [F] Not possible to change URL through host in a step for scenario that is from template.

    steps.
    1. Create template with web scenario
    2. Link template to host.
    3. Click on host, select web and try to change URL in a step.

    Notice that you cannot do it and the error displayed is:

    Cannot update web scenario Details Cannot update step for a templated web scenario "Zabbix frontend": unexpected parameter "no".

    vjaceslavs Fixed validation logic. RESOLVED in r66176

    vso CLOSED

    Comment by Vladislavs Sokurenko 2017 Mar 07

    (24) Punycode does not correctly encode if ASCII character is present, there is no delimiter 0x2D in code as it is in RFC specification https://www.ietf.org/rfc/rfc3492.txt
    This is very minor since does not affect most of functionality but.
    Under normal conditions string čūska.com would be encoded like xn--ska-eqa48b.com
    But this code encodes it as xn--bea2qska.com which is invalid punycode.

    I have tried idna_to_ascii_8z() from libidn and it works properly, could also consider using this opensource code

    vjaceslavs Missed mixed (unicode + ansi) domains. RESOLVED in r66186

    vso strange, but my čūska.com is translated to null now. could you please double check ?

    vjaceslavs Sorry, I am still getting used to the rule that constants should be placed on the left side of conditional statement. RESOLVED in r66188

    vso REOPENED 0x80 is not ASCII

    Test string that fails

    Ā.com

    (25) Punycode cannot encode some characters.

    For example this character f0 af a0 84 results in xn-lz2n.com which is invalid, while expected is xn-6qq.com

    I suspect that codepoint conversion is broken.

    Please decode xn--6qq.com using some other tool.

    vjaceslavs Let me get this straight... You manually encoded as f0 af a0 84 (in fact it should be e4 bd a0), then you used this value to check the result of punycode_encode and it failed to produce the same result as byte sequence e4 bd a0? You propose to fix current solution so it can "understand" that invalid encoding is used and should make valid UTF-8 out of it?

    vso there could be some conversion done automatically could you please try ㆟.com it's Japanese language symbol from katakana

    vjaceslavs I think that this is will be the only place in Zabbix that will support unicode equivalence... Do you propose to implement unicode character compatibility decomposition and then perform canonical composition in pure C? Or you want to add extra normalization of user input in frontend (intl dependency)? Are you sure users will ever use this functionality?

    vso That's what library function idna_to_ascii_8z() does but it looks like your are correct and this is very specific rare case and workaround is really easy. CLOSED as WONTFIX

    Comment by Vladislavs Sokurenko 2017 Mar 07
  • Application with applicationid "%1$s" does not exist.
  • Cannot convert POST data from raw data format to form field data format.
  • Cannot update a templated web scenario "%1$s": %2$s.
  • Cannot update step for a templated web scenario "%1$s": %2$s.
  • Data is not properly encoded.
  • Failed to parse URL.
  • Form data
  • Name of the form field should not exceed 255 characters.
  • Parse
  • Post fields
  • Post type
  • Query fields
  • Raw data
  • Raw post
  • URL is not properly encoded.
  • Values without names are not allowed in form fields.
  • is not enclosed in {} or is malformed
  • Strings deleted:

  • Cannot update step name for a templated web scenario "%1$s".
  • Created: Web scenario "%1$s" on "%2$s".
  • Deleted: Web scenario "%1$s" on "%2$s".
  • Empty web scenario ID.
  • Incorrect SSL verify host value for web scenario "%1$s".
  • Incorrect SSL verify peer value for web scenario "%1$s".
  • Incorrect follow redirects value for step "%1$s" of web scenario "%2$s".
  • Incorrect retrieve mode value for step "%1$s" of web scenario "%2$s".
  • Incorrect web scenario ID.
  • No "%1$s" given for web scenario.
  • Updated: Web scenario "%1$s" on "%2$s".
  • Web scenario missing parameters: %1$s
  • Web scenario must have at least one step.
  • Web scenario name cannot be empty.
  • Web scenario step "%1$s" already exists.
  • Web scenario step URL cannot be empty.
  • Web scenario step is missing parameters: %1$s
  • Web scenario step name cannot be empty.
  • Web scenario step number cannot be less than 1.
  • sasha Updated translation strings

    RESOLVED

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (28) [IS] According to C coding guidelines using such code constructions is prohibited

    src/libs/zbxdbupgrade/dbupgrade_3030.c:365

    char     *buffer = zbx_strdup(NULL, source), ...

    Some compilers have trouble compiling more complicated expressions like the following:

    size_t	src_size = strlen(src);
    int	feeds = src_size / maxline - (0 != src_size % maxline ? 0 : 1);

    vjaceslavs RESOLVED in r66499

    sasha

    dbupgrade_3030.c: In function ‘DBpatch_3030030_append_pairs’:
    dbupgrade_3030.c:365:19: warning: ‘buffer’ is used uninitialized in this function [-Wuninitialized]
      char   *buffer, *key = buffer, *value, replace;
    

    REOPENED

    vjaceslavs You are right. RESOLVED in r66503

    sasha Thanks! CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (33) [PS] punycode and url encode/decode functions shall be moved to separate library

    vjaceslavs RESOLVED in r66541

    sasha Cannot compile. Missing zbxhttp.h file.

    REOPENED

    vjaceslavs Sorry. Added missing file. RESOLVED in r66605

    sasha Looks good to me. Thanks. CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (34) [A] CApiInputValidator: Different order of parameters in validateHttpTestPairs method

    vjaceslavs RESOLVED in r66535

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (35) [A] CApiInputValidator: total absence of unit tests for new validation rules API_HTTP_*

    vjaceslavs RESOLVED in r66535

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (36) [A] CApiInputValidator: This code is incorrect. $delimiter instead of $pos is used in calls of substr() function.

    $pos = strpos($pair, $delimiter); if (false !== $pos) { $pair = [ 'name' => substr($pair, 0, $delimiter), 'value' => substr($pair, $delimiter + 1), else { $pair = [ 'name' => $pair, 'value' => '',

    FYI: it can be written by using explode() function:

    $pair = explode($delimiter, $pair, 2); $pair = [ 'name' => $pair[0], 'value' => array_key_exists(1, $pair) ? $pair[1] : ''

    vjaceslavs It can't really be replaced with explode as value can contain unlimited amount of delimiters so implode would be needed after explode.

    sasha If third parameter is set and positive, the returned array will contain a maximum of limit elements with the last element containing the rest of string.

    vjaceslavs RESOLVED in r66535

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (37) [A] CApiInlutValidator: In new methods all translations strings is incorrect. Validator should return very low-level error message like "Invalid parameter "<full_path_to_tag>": <short error message>."

    vjaceslavs RESOLVED in r66535

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (38) [A] CApiInputValidator: all standard validations in an array of $pairs shall be executed by already existing validators

    vjaceslavs RESOLVED in r66535

    sasha unit tests has been updated in r66549

    REOPENED

    vjaceslavs Some more unit test updates in r66590

    RESOLVED

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (39) [A] CApiInputValidator: all new methods validateHttp*() and formatHttpPairError() must be private

    vjaceslavs RESOLVED in r66535

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 17

    (40) [A] CApiInputValidator: incorrect type are given for $rules parameter for new methods validateHttp*() in PHPDoc

    vjaceslavs RESOLVED in r66535

    sasha CLOSED with minor fix in r66556

    Comment by Alexander Vladishev 2017 Mar 18

    (41) [A] C34XmlValidator: hosts/host(N)/httptests/httptest(N)/variables and hosts/host(N)/httptests/httptest(N)/headers are not API_REQUIRED now

    vjaceslavs Required flag removed from http step http fields and from http field values (except for headers) as well. RESOLVED in r66537, r66560

    sasha CLOSED with fix in r66587

    Comment by Alexander Vladishev 2017 Mar 18

    (42) [A] C34XmlValidator: new XML validation rules are incorrectly formatted

    sasha RESOLVED in r66525

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 20

    (43) [A] C34XmlValidator: headers, variables and query_fields should support API_INDEXED_ARRAYs only

    Unit tests must be updated: tests/unit/include/classes/import/converters/C32ImportConverterTest.php

    vjaceslavs RESOLVED in r66537

    sasha

  • if (is_string($value) should be removed from convertHttpFields() method. RESOLVED in r66591
  • take a look at my changes in r66555
  • CLOSED with minor improvements

    Comment by Alexander Vladishev 2017 Mar 20

    (44) [A] CApiInputValidator: calls of DB::getFieldLength() should be removed from CApiInputValidator methods

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 20

    (45) [A] 'query_fields' should support only objects

    vjaceslavs RESOLVED as a part of validation fixes in r66588

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 20

    (46) [A] strings for headers and variables should be deprecated

    vjaceslavs Deprecation notice was added to preprocessing method of API service. RESOLVED as a part of validation fixes in r66588

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 21

    sasha why this code was removed?

    frontends/php/include/classes/import/converters/C32ImportConverter.php

    @@ -144,7 +144,6 @@ 'value' => array_key_exists(1, $pair) ? $pair[1] : '' - unset($pair); return $pairs;

    REOPENED

    vjaceslavs Sorry, looks like I missed it while merging local repository with your changes. RESOLVED in r66668.

    sasha updated unit tests in r66676

    CLOSED

    Comment by Alexander Vladishev 2017 Mar 21

    (48) [A] CApiInputValidator: unused flags and options in new methods

    sasha RESOLVED in r66613

    vjaceslavs Thanks! CLOSED

    Comment by Alexander Vladishev 2017 Mar 24

    (49) [A] httptest.get: headers and variables related code should be moved into addRelatedObjects()

    sasha RESOLVED in r66689, r66690, 66707

    Also fixed filter option in DB::select() method, added unit tests. Fixed user.logout() method which uses this filter option.
    Improved performance of selectSteps option.

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 24

    (50) [A] cleaning of arrays is useless in httptest.create() method

    sasha RESOLVED in r66718

    Fixed formatting and variable name in convertHttpPairs() method in r66722

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 24

    (51) [A] function convertHttpPairs() has vulnerabilities

    Call of API::HttpTest()->create(['steps' => null]) causes PHP error:

    Invalid argument supplied for foreach() [httpconf.php:97 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->create() → CHttpTest->convertHttpPairs() in include/classes/api/services/CHttpTest.php:1146]
    

    vjaceslavs RESOLVED in r66724

    sasha Second issue:

    API::HttpTest()->create([
        'name' => 'my web scenario',
        'hostid' => 10107,
        'steps' => ['no' => 1, 'url' => 'http://aaa']
    
    array_key_exists() expects parameter 2 to be array, integer given [httpconf.php:98 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->create() → CHttpTest->convertHttpPairs() → array_key_exists() in include/classes/api/services/CHttpTest.php:1148]
    

    REOPENED

    vjaceslavs RESOLVED ir r66774

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 24

    vjaceslavs Changed to using string format for field "XXX" is deprecated.. RESOLVED in r66771 and r66772

    sasha CLOSED with minor fix in r66807

    Comment by Alexander Vladishev 2017 Mar 24

    (53) [A] variables, headers, query_fields and posts should be optional in httptest.create() and httptest.update() methods

    sasha RESOLVED in r66727

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 24

    (54) [A] httptest.create and httptest.update: applicationid shouldn't accept NULL values

    sasha RESOLVED in r66728

    vjaceslavs This fix made creating of httptest without application impossible. Is this a intended behavior? REOPENED

    sasha We should use 0 when creating of web scenario without application.

    vjaceslavs Ok. Then RESOLVED in r67132

    sasha Thanks! CLOSED

    Comment by Alexander Vladishev 2017 Mar 24

    (55) [A] r66176: Why this validation was removed?

    vjaceslavs Validation was merged from ZBX-3783, then it was removed for a number of reasons:

  • There was errors in validation. For example, code $unexpected_parameters[0] is not correct for all of the cases and causes undefined index errors (since array_diff preserves keys).
  • Even if array keys are reset and $unexpected_parameters[0] will not cause an error, it broke the existing functionality of editing of web scenarios from linked template (23).
  • Error message is invalid as it states that name or no are unexpected parameters, but documentation states that parameters are required (no exceptions mentioned).
  • As internal documentation and ZBX-3783 don't describe why validation changes were made, validation was not valid from implementation point and according to Zabbix documentation (name and no are both marked as required fields) and since it was unclear how this validation should work when ZBX-3783 is finished, it was removed as an unfinished part of ZBX-3783.

    sasha RESOLVED in r66814

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 24 'name' => 'my web scenario 03', 'hostid' => 10107, 'steps' => [['no' => 1, 'name' => 'step 01', 'url' => 'http://aaa']]
        Invalid argument supplied for foreach() [httpconf.php:98 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->create() → CHttpTestManager->persist() → CHttpTestManager->save() → CHttpTestManager->create() in include/classes/api/managers/CHttpTestManager.php:117]
        Invalid argument supplied for foreach() [httpconf.php:98 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->create() → CHttpTestManager->persist() → CHttpTestManager->save() → CHttpTestManager->create() in include/classes/api/managers/CHttpTestManager.php:117]
        array_merge(): Argument #1 is not an array [httpconf.php:98 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->create() → CHttpTestManager->persist() → CHttpTestManager->save() → CHttpTestManager->create() → array_merge() in include/classes/api/managers/CHttpTestManager.php:122]
        Invalid argument supplied for foreach() [httpconf.php:98 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->create() → CHttpTestManager->persist() → CHttpTestManager->save() → CHttpTestManager->create() → CHttpTestManager->createTestFieldsReal() in include/classes/api/managers/CHttpTestManager.php:818]
        Undefined index: posts [httpconf.php:98 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->create() → CHttpTestManager->persist() → CHttpTestManager->save() → CHttpTestManager->create() → CHttpTestManager->createStepsReal() in include/classes/api/managers/CHttpTestManager.php:864]
    

    sasha RESOLVED in r66739, r66740 and r66741

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 24
  • frontends/php/include/classes/api/managers/CHttpTestManager.php:827
    DB::insert('httptest_field', $fields);
  • frontends/php/include/classes/api/managers/CHttpTestManager.php:850
    DB::insert('httpstep_field', $fields);

    (59) [A] createTestFieldsReal() and createStepFieldsReal() can be executed for all tests together

    sasha RESOLVED in r66739, r66740 and r66741

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 25

    (60) [A] frontends/php/include/classes/api/managers/CHttpTestManager.php:289

    API_OUTPUT_EXTEND must never be used when performing get requests since it will request unnecessary data and may result in poor performance. Pass an array of specific fields instead.

    $httpTests = API::HttpTest()->get([ 'output' => API_OUTPUT_EXTEND, 'hostids' => $templateId, 'selectSteps' => API_OUTPUT_EXTEND, 'editable' => true, 'preservekeys' => true

    vjaceslavs RESOLVED in r66752

    sasha CLOSED with minor fix in r66806

    Comment by Alexander Vladishev 2017 Mar 25 'headers' => ZBX_HTTPFIELD_HEADER, 'variables' => ZBX_HTTPFIELD_VARIABLE, 'posts' => ZBX_HTTPFIELD_POST_FIELD, 'query_fields' => ZBX_HTTPFIELD_QUERY_FIELD foreach ($httpTests as &$httpTest) { foreach ($types as $field => $type) { if (array_key_exists($field, $httpTest) && is_array($httpTest[$field])) { foreach ($httpTest[$field] as &$pair) { $pair['type'] = $type; unset($pair); foreach ($httpTest['steps'] as &$httpStep) { foreach ($types as $field => $type) { if (array_key_exists($field, $httpStep) && is_array($httpStep[$field])) { foreach ($httpStep[$field] as &$pair) { $pair['type'] = $type; unset($pair); unset($httpStep); unset($httpTest);

    vjaceslavs Thanks for noticing! RESOLVED in r66745

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 25
        Undefined index: httpstepid [httpconf.php:360 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->update() → CHttpTest->validateUpdate() → CApiService->extendObjectsByKey() in include/classes/api/CApiService.php:751]
        Undefined index: httpstepid [httpconf.php:360 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->update() → CHttpTestManager->persist() → CHttpTestManager->inherit() → CHttpTestManager->save() → CHttpTestManager->update() in include/classes/api/managers/CHttpTestManager.php:202]
    

    sasha the first error was produced by me in ZBX-3783 and RESOLVED in r66742
    sasha the second error MOVED to ZBX-11975

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 28

    (63) [A] Web scenarios does not copied when link a read-only template with a host

    vjaceslavs RESOLVED in r66809, r66816

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 28

    (64) [F] httpconf\.php: pairs without changes shouldn't be passed to API::HttpTest()->update() method

    vjaceslavs RESOLVED in r67053

    sasha Error has ocurred when changing "Post type" from "Form data" to "Raw data".

    Invalid argument supplied for foreach() [ in httpconf.php:368]

    REOPENED

    vjaceslavs RESOLVED in r67117

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 28 if (array_key_exists('pairs', $step)) { foreach ($pair_names as $pair_name) { $step[$pair_name] = [];

    vjaceslavs RESOLVED in r66912

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 28

    (66) [F] httpconf.php: direct SQL requests are prohibited (if it possible) in controllers

    sasha RESOLVED in r66854, r66855, r66857 and r66860

    Also added sorting for variable lists.

    vjaceslavs CLOSED

    Comment by Alexander Vladishev 2017 Mar 30

    (67) [F] httpconf_popup.php:101 please do not use custom CSS for form elements.

    vjaceslavs Resolved as a part of (68) (removing of CDivs). RESOLVED in r67042

    sasha CLOSED

    Comment by Alexander Vladishev 2017 Mar 30
  • incorrect formatting, random order of the methods calls (addClass, setAttribute...), extra spaces nearest string concatination operator
  • configuration.httpconf.popup.php:142:160
  • configuration.httpconf.edit.php:107:139
  • CColHeader is optional here. ->setHeader(['', 'Name', '', 'Value', '']) - it looks easier
  • configuration.httpconf.popup.php:147:151
  • configuration.httpconf.edit.php:118:122
  • I checked the code of 3.4.0beta1 and found the bug.

    $ diff -uNrp ./src/libs/zbxdbupgrade/dbupgrade_3030.c.old ./src/libs/zbxdbupgrade/dbupgrade_3030.c
    --- ./src/libs/zbxdbupgrade/dbupgrade_3030.c.old	2017-08-03 13:38:10.000724677 +0900
    +++ ./src/libs/zbxdbupgrade/dbupgrade_3030.c	2017-08-03 13:38:47.483115453 +0900
    @@ -838,7 +838,7 @@ static int	DBpatch_3030060_migrate_pairs
     	target_id = zbx_malloc(NULL, len + ZBX_CONST_STRLEN("_fieldid"));
     	zbx_strlcpy(target_id, table, len);
    -	zbx_strlcat(target_id, "_fieldid", ZBX_CONST_STRLEN("_field"));
    +	zbx_strlcat(target_id, "_fieldid", ZBX_CONST_STRLEN("_fieldid"));
     	source_id = zbx_malloc(NULL, len + ZBX_CONST_STRLEN("id"));
     	zbx_strlcpy(source_id, table, len);
    

    vso reported as ZBX-12458

  •