Re: Lib Curl Conflicts with Norton Anti Virus

2020-03-06 Thread Ray Satiro via curl-library

On 3/6/2020 5:58 PM, Essam Makhlouf via curl-library wrote:


I had a life chat with Norton support agent and allowed a remote 
control session to help me resolve the problem. He confirmed the file 
is indeed infected. But could not explain why the 64 bit is not infected.
Norton agent suggested to exclude the file from Norton scan. But I 
explained this will not help. When Norton scans the file on the users 
machines, it will delete it from their machines. What I need is to 
resolve the conflict with Norton.


You must work with Norton to resolve the false positive (unless you are 
actually infected, in which case it's not a false positive). We cannot 
do anything about this. Create a post on Norton's forums [1] and explain 
what happened.


[1]: https://community.norton.com/en/forums/category/norton-products

---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: Very long URL returning CURLE_URL_MALFORMAT

2020-03-06 Thread Jeffrey Walton via curl-library
On Fri, Mar 6, 2020 at 6:08 PM Robert Brose via curl-library
 wrote:
>
> I'm having trouble figuring out what I'm doing wrong with an
> implementation of libcurl that is working for everything else I can
> throw at it. I've done a lot of searching stack overflow, etc and
> haven't figured out the issue yet.
> Using the latest libcurl I'm getting the above error back immediately
> with no data sent. It looks fine as far as I can tell and if I put the
> same URL into command line curl it works fine.
>
> https://r3---sn-vgqs7nlk.googlevideo.com/videoplayback?expire=1583550131&ei=U7piXujKIseCir4PhKec-Aw&ip=1.1.1.1&id=o-AHAFYbXI8YRoD0acpA-MVWR0l6dylcQoX4c-r7Jx4vMg&itag=248&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-vgqs7nlk%2Csn-qxoedn7d&ms=au%2Conr&mv=m&mvi=2&pl=20&initcwndbps=805000&vprv=1&mime=video%2Fwebm&gir=yes&clen=84511680&dur=357.123&lmt=1583350521559494&mt=1583528433&fvip=3&keepalive=yes&fexp=23842630&c=WEB&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ADKhkGMwRQIgCzr9srMO-3hlIOxxHI3EhMcB63reuEgfYcupN8315joCIQC315T8NyWNZv0oTedYBMepYi3ParbWUYp1Rgv_trMAsA%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRQIhAKo-wN50dUGo82aZ83P1PeleKiM_Whxp4HGrSd5w37hWAiAhVmYKbyqzmUGspMejmVGLWwbet8j3Z2nv8shJ3bF4Gg%3D%3D&ratebypass=yes
>
> It's a GET so I'm just using this to set it up:
>
> curl_easy_setopt(m_cURLFile->handle.curl, CURLOPT_URL,
> JRStringUTF8(m_fnURL.GetFilename()).GetString());
>
> The JRStringUTF8(m_fnURL.GetFilename()).GetString() returns a pointer to
> the null terminated c string exactly as seen above.
> All of the rest of the curl setup is precisely how I'm doing it for
> every other GET request.
>
> I run it through URL validators and it's fine.
> Is there some sort of maximum URL length?

If curl is not making a copy of JRStringUTF8, then the string could be
going away before the command completes.

Maybe you can add a first class temporary object that holds the
string. Then use it like:

char* temp = new char [...];
copy_string(temp, ...); // copy JRStringUTF8
curl_easy_setopt(m_cURLFile->handle.curl, CURLOPT_URL, temp);
delete[] temp;

The code above tries to rule out early destruction of the string, but
it is just a guess. It would probably be helpful if you could provide
more context. Is the code available on GitHub?

Jeff

---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Very long URL returning CURLE_URL_MALFORMAT

2020-03-06 Thread Robert Brose via curl-library
I'm having trouble figuring out what I'm doing wrong with an 
implementation of libcurl that is working for everything else I can 
throw at it. I've done a lot of searching stack overflow, etc and 
haven't figured out the issue yet.
Using the latest libcurl I'm getting the above error back immediately 
with no data sent. It looks fine as far as I can tell and if I put the 
same URL into command line curl it works fine.


https://r3---sn-vgqs7nlk.googlevideo.com/videoplayback?expire=1583550131&ei=U7piXujKIseCir4PhKec-Aw&ip=1.1.1.1&id=o-AHAFYbXI8YRoD0acpA-MVWR0l6dylcQoX4c-r7Jx4vMg&itag=248&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-vgqs7nlk%2Csn-qxoedn7d&ms=au%2Conr&mv=m&mvi=2&pl=20&initcwndbps=805000&vprv=1&mime=video%2Fwebm&gir=yes&clen=84511680&dur=357.123&lmt=1583350521559494&mt=1583528433&fvip=3&keepalive=yes&fexp=23842630&c=WEB&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ADKhkGMwRQIgCzr9srMO-3hlIOxxHI3EhMcB63reuEgfYcupN8315joCIQC315T8NyWNZv0oTedYBMepYi3ParbWUYp1Rgv_trMAsA%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRQIhAKo-wN50dUGo82aZ83P1PeleKiM_Whxp4HGrSd5w37hWAiAhVmYKbyqzmUGspMejmVGLWwbet8j3Z2nv8shJ3bF4Gg%3D%3D&ratebypass=yes

It's a GET so I'm just using this to set it up:

curl_easy_setopt(m_cURLFile->handle.curl, CURLOPT_URL, 
JRStringUTF8(m_fnURL.GetFilename()).GetString());


The JRStringUTF8(m_fnURL.GetFilename()).GetString() returns a pointer to 
the null terminated c string exactly as seen above.
All of the rest of the curl setup is precisely how I'm doing it for 
every other GET request.


I run it through URL validators and it's fine.
Is there some sort of maximum URL length?

TIA,
Bob
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Lib Curl Conflicts with Norton Anti Virus

2020-03-06 Thread Essam Makhlouf via curl-library
Dear all,

I wrote a win32 application to download files from Dropbox account. The
program is Unicode and statically liked to Libcurl library. This program is
distributed with software package to users to let them have new updates of
the package whenever they are posted on the cloud. So, it is kind of
auto-update utility.
The problem is Norton Antivirus detects my program as having a virus and
deletes it. The virus name is "Heur.AdvML.B".
I compile this program in 64 and 32 bits. Norton detects the virus in the
32 bit version only. Norton does not detect any virus in the x64 bit
version.

My machine has Windows 10 x64.
My compiler is Visual Studio 2017.
I downloaded Lib Curl source and compiled it into static library for 32 and
64 bit.
I tried Lib Curl version 7.67.0, 7.68.0, and 7.69.0. All produced same
result.

I had a life chat with Norton support agent and allowed a remote control
session to help me resolve the problem. He confirmed the file is indeed
infected. But could not explain why the 64 bit is not infected.
Norton agent suggested to exclude the file from Norton scan. But I
explained this will not help. When Norton scans the file on the users
machines, it will delete it from their machines. What I need is to resolve
the conflict with Norton.

I tried to search for the string "Heur.AdvML.B" or parts of it in the
source files of Curl but could not find anything.

I wonder if anyone has faced similar issue and what is the solution.

Best regards,

*Essam Makhlouf, PE*


*Al-Rehab 122/06/34*

*Cairo - 11841, Egypt*

*Mobile +20 100 516 0999 <+41%2079%20546%2020%2042>*

*Email * *essamakhl...@gmail.com *
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: CURLOPT_POST with no CURLOPT_POSTFIELDS

2020-03-06 Thread Daniel Stenberg via curl-library

On Fri, 6 Mar 2020, Jason Proctor via curl-library wrote:

Looking at the test case I think the issue is that I set CURLOPT_POST and 
provide neither CURLOPT_POSTFIELDS nor a read function. If the API contract 
says I have to do one or the other, fair enough - but should Curl survive if 
I don't?


Okay but as a POST request implies a request body, where do you provide said 
body?


Without CURLOPT_POSTFIELDS (and *with* CURLOPT_POST set), libcurl only offers 
one other way to provide the request body and that is the read callback. If 
you don't set it, libcurl has a default read function that does an fread() by 
stdin by default.


What did you expect would happen? A zero byte body?

In my mind, CURLOPT_POST explains that you *either* use CURLOPT_POSTFIELDS or 
a read callback and that there's no third option, but I'm certainly open for 
that we need to extend or clarify the docs somewhere!


--

 / daniel.haxx.se | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://www.wolfssl.com/contact/
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: CURLOPT_POST with no CURLOPT_POSTFIELDS

2020-03-06 Thread Jason Proctor via curl-library
On Thu, Mar 5, 2020 at 7:28 AM Daniel Stenberg  wrote:
>
> On Wed, 4 Mar 2020, Jason Proctor via curl-library wrote:
>
> > The issue is that if you specify CURLOPT_POST but don't specify
> > CURLOPT_POSTFIELDS, then the library sticks in sending mode and
> > doesn't call the header or write callbacks, despite the fact that the
> > server has happily sent a response. Setting CURLOPT_POSTFIELDS to the
> > empty string results in the correct behaviour.
>
> That's not expected behavior nor does it match what existing libcurl tests
> verify that works. For example in test 1514:
>
>   https://github.com/curl/curl/blob/master/tests/libtest/lib1514.c
>
> Can you provide a test code that reproduces this?
>

Looking at the test case I think the issue is that I set CURLOPT_POST
and provide neither CURLOPT_POSTFIELDS nor a read function. If the API
contract says I have to do one or the other, fair enough - but should
Curl survive if I don't?

Here's my code --

http://www.redfish.net/curl.c
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: AIX 7.2 XLC Linker issues

2020-03-06 Thread Daniel Stenberg via curl-library

On Fri, 6 Mar 2020, Andy O'Shaughnessy via curl-library wrote:


*Why might I get these linker errors using XLC on AIX 7.2?*


Please take us through the process. When do you get those and how?

--

 / daniel.haxx.se | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://www.wolfssl.com/contact/
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

AIX 7.2 XLC Linker issues

2020-03-06 Thread Andy O'Shaughnessy via curl-library
*Why might I get these linker errors using XLC on AIX 7.2?*

*System :*

% xlc -qversion
IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07)
Version: 13.01.0003.

% uname -a
AIX  2 7 00F785084C00

*Linker Errors :*

ld: 0711-317 ERROR: Undefined symbol: __crt0v
ld: 0711-317 ERROR: Undefined symbol: exit
ld: 0711-317 ERROR: Undefined symbol: __mod_init
ld: 0711-317 ERROR: Undefined symbol: __malloc_user_defined_name
ld: 0711-317 ERROR: Undefined symbol: errno
ld: 0711-317 ERROR: Undefined symbol:
.__dt__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__Fv
ld: 0711-317 ERROR: Undefined symbol: .__dl__FPv
ld: 0711-317 ERROR: Undefined symbol:
.compare__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__CFPCc
ld: 0711-317 ERROR: Undefined symbol:
.__ct__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__FRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__
ld: 0711-317 ERROR: Undefined symbol:
.__ct__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__FPCc
ld: 0711-317 ERROR: Undefined symbol: .__setUncaughtExceptionFlag__3stdFb
ld: 0711-317 ERROR: Undefined symbol: .__ThrowV6
ld: 0711-317 ERROR: Undefined symbol:
.clear__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__Fv
ld: 0711-317 ERROR: Undefined symbol:
.__as__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__FPCc
ld: 0711-317 ERROR: Undefined symbol: __dl__FPv
ld: 0711-317 ERROR: Undefined symbol:
__UnsupportedConditionalExpressionDestruction__FPvl
ld: 0711-317 ERROR: Undefined symbol:
.__ct__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__Fv
ld: 0711-317 ERROR: Undefined symbol: cout__3std
ld: 0711-317 ERROR: Undefined symbol:
.__ls__3stdHQ2_3std11char_traitsXTc__RQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__PCc_RQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__
ld: 0711-317 ERROR: Undefined symbol:
endl__3stdHcQ2_3std11char_traitsXTc__RQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc___RQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__
ld: 0711-317 ERROR: Undefined symbol:
.__ls__Q2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__FPFRQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc___RQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__
ld: 0711-317 ERROR: Undefined symbol:
.__apl__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__FPCc
ld: 0711-317 ERROR: Undefined symbol: cerr__3std
ld: 0711-317 ERROR: Undefined symbol:
.find_last_of__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__CFPCcUl
ld: 0711-317 ERROR: Undefined symbol:
.substr__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__CFUlT1
ld: 0711-317 ERROR: Undefined symbol:
.__as__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__FRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__
ld: 0711-317 ERROR: Undefined symbol:
.__ls__3stdHcQ2_3std11char_traitsXTc_Q2_3std9allocatorXTc__RQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__RCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc___RQ2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__
ld: 0711-317 ERROR: Undefined symbol: .atoi
ld: 0711-317 ERROR: Undefined symbol:
.__vc__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__FUl
ld: 0711-317 ERROR: Undefined symbol:
.length__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__CFv
ld: 0711-317 ERROR: Undefined symbol: .__nw__FUl
ld: 0711-317 ERROR: Undefined symbol:
.c_str__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__CFv
ld: 0711-317 ERROR: Undefined symbol: .__ReThrowV6
ld: 0711-317 ERROR: Undefined symbol: .unexpected__3stdFv
ld: 0711-317 ERROR: Undefined symbol: .terminate__3stdFv
ld: 0711-317 ERROR: Undefined symbol: .__CleanupCatchV6a
ld: 0711-317 ERROR: Undefined symbol:
.__ls__Q2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__FL
ld: 0711-317 ERROR: Undefined symbol:
.__ls__Q2_3std13basic_ostreamXTcTQ2_3std11char_traitsXTc__Fi
ld: 0711-317 ERROR: Undefined symbol:
.__ct__Q2_3std19basic_ostringstreamXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__Fi
ld: 0711-317 ERROR: Undefined symbol:
.__dt__Q2_3std19basic_ostringstreamXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__Fv
ld: 0711-317 ERROR: Undefined symbol:
.str__Q2_3std19basic_ostringstreamXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__CFv
ld: 0711-317 ERROR: Undefined symbol: .unatexit
ld: 0711-317 ERROR: Undefined symbol:
.__ct__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__FUlc
ld: 0711-317 ERROR: Undefined symbol: .atexit
ld: 0711-317 ERROR: Undefined symbol:
.__apl__Q2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__Fc
ld: 0711-317 ERROR: Undefined symbol: .sprintf
ld: 0711-317 ERROR: Undefined symbol:
__dt__Q2_3std19basic_ostringstreamXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__Fv
ld: 

New repo: scripts for project stats

2020-03-06 Thread Daniel Stenberg via curl-library

Hi friends!

As some of you might've figured out, I have a soft spot for creating graphs 
and visualizations of various project metrics and how they change over time.


Yesterday, I decided it was time I started to move over my collection of 
stats-generating scripts into a git repo to share with the rest of you. This 
will allow everyone to reproduce my data/graphs, to verify that they're 
accurate and of course, to improve the scripts and add to the collection over 
time.


The new repo for curl project statistics scripts is here:

  https://github.com/curl/stats

Most of the scripts just output CSV data. There's nothing there that actually 
makes graphs out of them, but I've typicall imported those CSV files into 
libreoffice and handcrafted them from there.


If someone has some gnuplot (or similar) skills that can generate graphs from 
such CSV input, we could even consider auto-updating a set of the graphs for 
everyones' pleasure at some point.


As always: your issues and pull requests will be appreciated.

(There will be plenty of graphs in the coming 22nd curl anniversary blog 
post...)


--

 / daniel.haxx.se | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://www.wolfssl.com/contact/
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html