Mailing List Archive

Possible bug in 1.1.2?
Hi all!

I’m seeing this occurrences in Davical error log :

[Fri Mar 20 08:57:14.424397 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: FATAL: :Insert into calendar_item failed...
[Fri Mar 20 08:57:14.424406 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ================= Stack Trace ===================
[Fri Mar 20 08:57:14.424449 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ===> /WEBROOT/htdocs/caldav.php[120] calls include()
[Fri Mar 20 08:57:14.424461 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ===> /WEBROOT/inc/caldav-PUT-vcalendar.php[85] calls write_resource()
[Fri Mar 20 08:57:15.108049 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: Error: QF in '/WEBROOT/inc/caldav-PUT-functions.php' on line 424
[Fri Mar 20 08:57:15.108153 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: SQL error "42883" - ERROR: operator does not exist: integer = boolean L\xc3\x8dNEA 1: ..._id FROM collection WHERE is_calendar AND user_no =FALSE) AN... ^ SUGERENCIA: No operator matches the given name and argument type(s). You might need to add
[Fri Mar 20 08:57:15.108226 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: explicit type casts."
[Fri Mar 20 08:57:15.108301 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: Error: QF in '/WEBROOT/inc/caldav-PUT-functions.php' on line 424
[Fri Mar 20 08:57:15.108332 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: SELECT caldav_data.dav_name, caldav_data.caldav_data, caldav_data.collection_id FROM caldav_data JOIN calendar_item USING(dav_id) WHERE caldav_data.collection_id IN (SELECT collection_id FROM collection WHERE is_calendar AND user_no =?) AND
[Fri Mar 20 08:57:15.108361 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: uid=? LIMIT 1
[Fri Mar 20 08:57:15.108398 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: "0" => ""
[Fri Mar 20 08:57:15.108427 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: "1" => "040000008200E00074C5B7101A82E008000000003026C8453750CC01000000000000000010000000A2B740FE3CCCDB4A85057693194104F8"
[Fri Mar 20 08:57:15.108475 2015] [:error] [pid 14525] [client 1.2.3.4:5678] PHP Notice: Trying to get property of non-object in /WEBROOT/inc/caldav-PUT-functions.php on line 428

Could this perhaps be a bug due to being properly validated if ( $attendee_principal == false ) in :


line 410



// an attendee's reply should modify only the PARTSTAT on other attendees' objects
// other properties (that might have been adjusted individually by those other
// attendees) should remain unmodified. Therefore, we have to make $schedule_original
// and $schedule_request be initialized by each attendee's object here.
$attendee_principal = new DAVPrincipal ( array ('email'=>$email, 'options'=> array ( 'allow_by_email' => true ) ) );
if ( $attendee_principal == false ){
dbg_error_log( 'PUT', 'Could not find attendee %s', $email);
continue;
}
$sql = 'SELECT caldav_data.dav_name, caldav_data.caldav_data, caldav_data.collection_id FROM caldav_data JOIN calendar_item USING(dav_id) ';
$sql .= 'WHERE caldav_data.collection_id IN (SELECT collection_id FROM collection WHERE is_calendar AND user_no =?) ';
$sql .= 'AND uid=? LIMIT 1';
$qry = new AwlQuery($sql,$attendee_principal->user_no(), $uid);
if ( !$qry->Exec('PUT',__LINE__,__FILE__) || $qry->rows() < 1 ) {
dbg_error_log( 'PUT', "Could not find attendee's event %s", $uid );
}



line 427

It’s sending as user_no a FALSE and obviously database is complaining because it awaits there an integer, not a boolean…. Perhaps the proper way of validating it should be :

if (!$attendee_principal->user_no()){
dbg_error_log( 'PUT', 'Could not find attendee %s', $email);
continue;
}

Have been taking a look at gitlab’s repository and have not seen changes implying this behavior….

How do you see this?.

Best regards,
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Possible bug in 1.1.2? [ In reply to ]
I suspect too… going slightly further… the issue could be with the new class contruct validation (inherited) from Principal.php for :

$attendee_principal = new DAVPrincipal ( array ('email'=>$email, 'options'=> array ( 'allow_by_email' => true ) ) );

…. perhaps it creates the class when it should…

Anyway tell me if I could help..

Regards,


> El 21/3/2015, a las 17:28, Egoitz Aurrekoetxea <egoitz@ramattack.net> escribió:
>
> Hi all!
>
> I’m seeing this occurrences in Davical error log :
>
> [Fri Mar 20 08:57:14.424397 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: FATAL: :Insert into calendar_item failed...
> [Fri Mar 20 08:57:14.424406 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ================= Stack Trace ===================
> [Fri Mar 20 08:57:14.424449 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ===> /WEBROOT/htdocs/caldav.php[120] calls include()
> [Fri Mar 20 08:57:14.424461 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ===> /WEBROOT/inc/caldav-PUT-vcalendar.php[85] calls write_resource()
> [Fri Mar 20 08:57:15.108049 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: Error: QF in '/WEBROOT/inc/caldav-PUT-functions.php' on line 424
> [Fri Mar 20 08:57:15.108153 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: SQL error "42883" - ERROR: operator does not exist: integer = boolean L\xc3\x8dNEA 1: ..._id FROM collection WHERE is_calendar AND user_no =FALSE) AN... ^ SUGERENCIA: No operator matches the given name and argument type(s). You might need to add
> [Fri Mar 20 08:57:15.108226 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: explicit type casts."
> [Fri Mar 20 08:57:15.108301 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: Error: QF in '/WEBROOT/inc/caldav-PUT-functions.php' on line 424
> [Fri Mar 20 08:57:15.108332 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: SELECT caldav_data.dav_name, caldav_data.caldav_data, caldav_data.collection_id FROM caldav_data JOIN calendar_item USING(dav_id) WHERE caldav_data.collection_id IN (SELECT collection_id FROM collection WHERE is_calendar AND user_no =?) AND
> [Fri Mar 20 08:57:15.108361 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: uid=? LIMIT 1
> [Fri Mar 20 08:57:15.108398 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: "0" => ""
> [Fri Mar 20 08:57:15.108427 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: "1" => "040000008200E00074C5B7101A82E008000000003026C8453750CC01000000000000000010000000A2B740FE3CCCDB4A85057693194104F8"
> [Fri Mar 20 08:57:15.108475 2015] [:error] [pid 14525] [client 1.2.3.4:5678] PHP Notice: Trying to get property of non-object in /WEBROOT/inc/caldav-PUT-functions.php on line 428
>
> Could this perhaps be a bug due to being properly validated if ( $attendee_principal == false ) in :
>
>
> line 410
>
>
>
> // an attendee's reply should modify only the PARTSTAT on other attendees' objects
> // other properties (that might have been adjusted individually by those other
> // attendees) should remain unmodified. Therefore, we have to make $schedule_original
> // and $schedule_request be initialized by each attendee's object here.
> $attendee_principal = new DAVPrincipal ( array ('email'=>$email, 'options'=> array ( 'allow_by_email' => true ) ) );
> if ( $attendee_principal == false ){
> dbg_error_log( 'PUT', 'Could not find attendee %s', $email);
> continue;
> }
> $sql = 'SELECT caldav_data.dav_name, caldav_data.caldav_data, caldav_data.collection_id FROM caldav_data JOIN calendar_item USING(dav_id) ';
> $sql .= 'WHERE caldav_data.collection_id IN (SELECT collection_id FROM collection WHERE is_calendar AND user_no =?) ';
> $sql .= 'AND uid=? LIMIT 1';
> $qry = new AwlQuery($sql,$attendee_principal->user_no(), $uid);
> if ( !$qry->Exec('PUT',__LINE__,__FILE__) || $qry->rows() < 1 ) {
> dbg_error_log( 'PUT', "Could not find attendee's event %s", $uid );
> }
>
>
>
> line 427
>
> It’s sending as user_no a FALSE and obviously database is complaining because it awaits there an integer, not a boolean…. Perhaps the proper way of validating it should be :
>
> if (!$attendee_principal->user_no()){
> dbg_error_log( 'PUT', 'Could not find attendee %s', $email);
> continue;
> }
>
> Have been taking a look at gitlab’s repository and have not seen changes implying this behavior….
>
> How do you see this?.
>
> Best regards,


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
Re: Possible bug in 1.1.2 (and later)? [ In reply to ]
> El 21/3/2015, a las 17:46, Egoitz Aurrekoetxea <egoitz@ramattack.net> escribió:
>
> I suspect too… going slightly further… the issue could be with the new class contruct validation (inherited) from Principal.php for :
>
> $attendee_principal = new DAVPrincipal ( array ('email'=>$email, 'options'=> array ( 'allow_by_email' => true ) ) );
>
> …. perhaps it creates the class when it should…
>
> Anyway tell me if I could help..
>
> Regards,
>
>
>> El 21/3/2015, a las 17:28, Egoitz Aurrekoetxea <egoitz@ramattack.net> escribió:
>>
>> Hi all!
>>
>> I’m seeing this occurrences in Davical error log :
>>
>> [Fri Mar 20 08:57:14.424397 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: FATAL: :Insert into calendar_item failed...
>> [Fri Mar 20 08:57:14.424406 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ================= Stack Trace ===================
>> [Fri Mar 20 08:57:14.424449 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ===> /WEBROOT/htdocs/caldav.php[120] calls include()
>> [Fri Mar 20 08:57:14.424461 2015] [:error] [pid 14525] [client 1.2.3.4:5678] ===> /WEBROOT/inc/caldav-PUT-vcalendar.php[85] calls write_resource()
>> [Fri Mar 20 08:57:15.108049 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: Error: QF in '/WEBROOT/inc/caldav-PUT-functions.php' on line 424
>> [Fri Mar 20 08:57:15.108153 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: SQL error "42883" - ERROR: operator does not exist: integer = boolean L\xc3\x8dNEA 1: ..._id FROM collection WHERE is_calendar AND user_no =FALSE) AN... ^ SUGERENCIA: No operator matches the given name and argument type(s). You might need to add
>> [Fri Mar 20 08:57:15.108226 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: explicit type casts."
>> [Fri Mar 20 08:57:15.108301 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: Error: QF in '/WEBROOT/inc/caldav-PUT-functions.php' on line 424
>> [Fri Mar 20 08:57:15.108332 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: SELECT caldav_data.dav_name, caldav_data.caldav_data, caldav_data.collection_id FROM caldav_data JOIN calendar_item USING(dav_id) WHERE caldav_data.collection_id IN (SELECT collection_id FROM collection WHERE is_calendar AND user_no =?) AND
>> [Fri Mar 20 08:57:15.108361 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: uid=? LIMIT 1
>> [Fri Mar 20 08:57:15.108398 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: "0" => ""
>> [Fri Mar 20 08:57:15.108427 2015] [:error] [pid 14525] [client 1.2.3.4:5678] davical: LOG: PUT: Query: QF: "1" => "040000008200E00074C5B7101A82E008000000003026C8453750CC01000000000000000010000000A2B740FE3CCCDB4A85057693194104F8"
>> [Fri Mar 20 08:57:15.108475 2015] [:error] [pid 14525] [client 1.2.3.4:5678] PHP Notice: Trying to get property of non-object in /WEBROOT/inc/caldav-PUT-functions.php on line 428
>>
>> Could this perhaps be a bug due to being properly validated if ( $attendee_principal == false ) in :
>>
>>
>> line 410
>>
>>
>>
>> // an attendee's reply should modify only the PARTSTAT on other attendees' objects
>> // other properties (that might have been adjusted individually by those other
>> // attendees) should remain unmodified. Therefore, we have to make $schedule_original
>> // and $schedule_request be initialized by each attendee's object here.
>> $attendee_principal = new DAVPrincipal ( array ('email'=>$email, 'options'=> array ( 'allow_by_email' => true ) ) );
>> if ( $attendee_principal == false ){
>> dbg_error_log( 'PUT', 'Could not find attendee %s', $email);
>> continue;
>> }
>> $sql = 'SELECT caldav_data.dav_name, caldav_data.caldav_data, caldav_data.collection_id FROM caldav_data JOIN calendar_item USING(dav_id) ';
>> $sql .= 'WHERE caldav_data.collection_id IN (SELECT collection_id FROM collection WHERE is_calendar AND user_no =?) ';
>> $sql .= 'AND uid=? LIMIT 1';
>> $qry = new AwlQuery($sql,$attendee_principal->user_no(), $uid);
>> if ( !$qry->Exec('PUT',__LINE__,__FILE__) || $qry->rows() < 1 ) {
>> dbg_error_log( 'PUT', "Could not find attendee's event %s", $uid );
>> }
>>
>>
>>
>> line 427
>>
>> It’s sending as user_no a FALSE and obviously database is complaining because it awaits there an integer, not a boolean…. Perhaps the proper way of validating it should be :
>>
>> if (!$attendee_principal->user_no()){
>> dbg_error_log( 'PUT', 'Could not find attendee %s', $email);
>> continue;
>> }
>>
>> Have been taking a look at gitlab’s repository and have not seen changes implying this behavior….
>>
>> How do you see this?.
>>
>> Best regards,
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general