Re: [squid-dev] rfc1738.c

2020-10-29 Thread Alex Rousskov
On 10/29/20 7:41 AM, Amos Jeffries wrote:

> The latest Squid have AnyP::Uri::Encode() whic uses a caller provided
> buffer.

Just to avoid misunderstanding: AnyP::Uri::Encode() uses a
caller-provided buffer as _input_. So does rfc1738*_escape(), of course.
That kind of input is unavoidable and is not really the issue that
prompted my earlier comments about rfc1738_do_escape() dangers.

The primary in-scope problem with rfc1738*_escape() is the _output_
interface. If those functions cannot be completely removed, they should
return an SBuf. The exact best input interface will depend on the
callers, but it will always remain a "caller provided buffer".


HTH,

Alex.
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] rfc1738.c

2020-10-29 Thread Alex Rousskov
On 10/29/20 7:17 AM, Damian Wojslaw wrote:

> It was mentioned that rfc1738_do_escape could use changing so it doesn't
> return static buffer.

Yes. Most likely, rfc1738 family of functions should return an SBuf, but
refactoring that may require a serious effort, on several layers. This
is not the easiest Squid XXX to fix by far!

However, please do not misinterpret my comment as a NACK. Just be
prepared to move rfc1738 code into src/ where it belongs and work on
refactoring the API to remove those ugly macros and rework a
difficult-to-grok set of positive and negative flags.


> I'm also interested in getting my hands in cachegr.cc, as it was
> described as neglected in the PR.

If there may be consensus that cachemgr.cc should be removed, then
consider confirming that consensus (here) and removing cachemgr. Doing
so may be a lot easier than fixing rfc1738_do_escape().


Thank you,

Alex.
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] rfc1738.c

2020-10-29 Thread Damian Wojslaw
On Thu, Oct 29, 2020 at 12:49 PM Amos Jeffries  wrote:

>
> The latest Squid have AnyP::Uri::Encode() whic uses a caller provided
> buffer. What needs doing now is finding old rfc1738*_escape() which can
> be replaced with the new API.
>
> For example; code like urlCanonicalCleanWithoutRequest() where the data
> is stored in an SBuf, but converted to char* in order to use the rfc1738
> API.
>
> Also a AnyP::Uri::Decode function needs adding so we can convert the
> rfc1738_*unescape() callers too.
>

Ok, I'll get myself familiar with that.


> The cachemgr.cc code is "neglected" primarily because it is deprecated.
> It has been replaced by reports served directly in HTTP by the proxy.
>

Thank you


> Amos
>
-- 
Damian Wojsław
He/Him/His
Software Maintenance Engineer EMEA
irc: madwizard
@RedHat    Red Hat
  Red Hat

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] rfc1738.c

2020-10-29 Thread Amos Jeffries

On 30/10/20 12:17 am, Damian Wojslaw wrote:

Helo

I've been recently following the PR that addresses issue with 
authentication in cachemgr.cc.
It was mentioned that rfc1738_do_escape could use changing so it doesn't 
return static buffer.


The latest Squid have AnyP::Uri::Encode() whic uses a caller provided 
buffer. What needs doing now is finding old rfc1738*_escape() which can 
be replaced with the new API.


For example; code like urlCanonicalCleanWithoutRequest() where the data 
is stored in an SBuf, but converted to char* in order to use the rfc1738 
API.


Also a AnyP::Uri::Decode function needs adding so we can convert the 
rfc1738_*unescape() callers too.



I'm interested in working on it. I'm also interested in getting my hands 
in cachegr.cc, as it was described as neglected in the PR. This last 
remark would give me hope that my speed of work wouldn't be too slow.
I'd probably require some mentoring in the process. If there are no 
NACKs, I'd like to start working on it.


The cachemgr.cc code is "neglected" primarily because it is deprecated. 
It has been replaced by reports served directly in HTTP by the proxy.



Amos
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] rfc1738.c

2020-10-29 Thread Damian Wojslaw
Helo

I've been recently following the PR that addresses issue with
authentication in cachemgr.cc.
It was mentioned that rfc1738_do_escape could use changing so it doesn't
return static buffer.
I'm interested in working on it. I'm also interested in getting my hands in
cachegr.cc, as it was described as neglected in the PR. This last remark
would give me hope that my speed of work wouldn't be too slow.
I'd probably require some mentoring in the process. If there are no NACKs,
I'd like to start working on it.

Any suggestions are most welcome.

Regards

-- 
Damian Wojsław
He/Him/His
Software Maintenance Engineer EMEA
irc: madwizard
@RedHat    Red Hat
  Red Hat

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev