GNU bug report logs -
#33292
Piped log program failed unexpectedly when using sed with Apache at windows
Previous Next
Reported by: Assaf Gordon <assafgordon <at> gmail.com>
Date: Tue, 6 Nov 2018 17:43:01 UTC
Severity: normal
Tags: moreinfo, notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33292 in the body.
You can then email your comments to 33292 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-sed <at> gnu.org
:
bug#33292
; Package
sed
.
(Tue, 06 Nov 2018 17:43:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Assaf Gordon <assafgordon <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-sed <at> gnu.org
.
(Tue, 06 Nov 2018 17:43:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Bug report forwarded from
From github https://github.com/agordon/sed/issues/1
and/or stackoverflow https://stackoverflow.com/q/53118038
Vikram Singh writes:
====
I am using sed to mask some data in proxy logs of Apache at windows.
Putting command in httpd.conf file is :
CustomLog "|$'C:/Program Files (x86)/GnuWin32/bin/sed' -i
's/password=[^ ]*/password=masked/' 'logs/proxy-access.log'" combined
on starting Apache service command prompts start opening and closing and
in error.logs found exception i.e :
AH00106: piped log program ''C:/Program Files (x86)/GnuWin32/bin/sed' -i
's/password=[^ ]*/password=masked/' 'C:/Apache24/logs/proxy-access.log''
failed unexpectedly
apache logging sed proxy
===
Information forwarded
to
bug-sed <at> gnu.org
:
bug#33292
; Package
sed
.
(Tue, 06 Nov 2018 17:52:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 33292 <at> debbugs.gnu.org (full text, mbox):
tags 33292 moreinfo
stop
Hello,
On 2018-11-06 10:42 a.m., Assaf Gordon wrote:
> Bug report forwarded from
> From github https://github.com/agordon/sed/issues/1
> and/or stackoverflow https://stackoverflow.com/q/53118038
>
> Vikram Singh writes:
> ====
> I am using sed to mask some data in proxy logs of Apache at windows.
> Putting command in httpd.conf file is :
>
> CustomLog "|$'C:/Program Files (x86)/GnuWin32/bin/sed' -i
> 's/password=[^ ]*/password=masked/' 'logs/proxy-access.log'" combined
The GnuWin32 version is sed is not maintained by us, so we can't
directly help with it.
There were alos some windows-related improvements recently,
if you could test a newer version that would be very useful.
Lastly,
The command seems weird at a cursory look:
Using "|" means you are piping into sed (and expecting sed to output
the data to STDOUT). but using "sed -i" is "replace --in-place",
meaning it will read the "logs/proxy-access.log" and update it without
reading anything from STDIN or writing anything to STDOUT.
Is that intentional?
> on starting Apache service command prompts start opening and closing and
> in error.logs found exception i.e :
>
> AH00106: piped log program ''C:/Program Files (x86)/GnuWin32/bin/sed' -i
> 's/password=[^ ]*/password=masked/' 'C:/Apache24/logs/proxy-access.log''
> failed unexpectedly
> apache logging sed proxy
> ===
>
"failed unexpectedly" is not a sed error - another program generates it
(apache?) - so it isn't clear what is failing and how.
Can you provide more details?
regards,
- assaf
Added tag(s) moreinfo.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 06 Nov 2018 17:52:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-sed <at> gnu.org
:
bug#33292
; Package
sed
.
(Mon, 12 Nov 2018 14:41:04 GMT)
Full text and
rfc822 format available.
Message #13 received at 33292 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I am trying to achieve the solution mentioned at https://serverfault.com/questions/220963/preventing-an-apache-2-server-from-logging-sensitive-data
Here are the details of issues : https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33292
I am trying to mask data of GET request. Like request Like www.example.com?password=123445&uname=abc<http://www.example.com?password=123445&uname=abc>
It should get log in .log file like this : www.example.com?password=XXXXXX&uname=abc<http://www.example.com?password=XXXXXX&uname=abc>
Its urgent to me. Please le me know what more information I can provide.
Thanks You
VIkram
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-sed <at> gnu.org
:
bug#33292
; Package
sed
.
(Mon, 12 Nov 2018 18:40:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 33292 <at> debbugs.gnu.org (full text, mbox):
Hello,
On 2018-11-12 3:41 a.m., Behgal, Vikram wrote:
> Hi,
>
> I am trying to achieve the solution mentioned at https://serverfault.com/questions/220963/preventing-an-apache-2-server-from-logging-sensitive-data
> Here are the details of issues : https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33292
>
[...]
>
> Its urgent to me. Please le me know what more information I can provide.
We can help with sed issues, but not with apache issues.
If you have a specific error message generated by sed,
please tell us the error.
As written here:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33292#8
compared to the ServerFault answer, you have an extraneousness "-i"
parameter that might cause unexpected results.
Did you try running sed without it ?
-assaf
Information forwarded
to
bug-sed <at> gnu.org
:
bug#33292
; Package
sed
.
(Tue, 13 Nov 2018 04:42:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 33292 <at> debbugs.gnu.org (full text, mbox):
Hi Assaf,
I tried sed without it. Its worked fine.
I just want to give standard input from apache logs to the sed and write output to the file.
Is there any command to achieve this. Jut for standard input and output rather than reading from file.
- Vikram
-----Original Message-----
From: Assaf Gordon <assafgordon <at> gmail.com>
Sent: 13 November, 2018 12:10 AM
To: Behgal, Vikram <Vikram.Behgal <at> basware.com>; 33292 <at> debbugs.gnu.org
Subject: Re: bug#33292: issue : Mask sensitive data in apache logs using sed
Hello,
On 2018-11-12 3:41 a.m., Behgal, Vikram wrote:
> Hi,
>
> I am trying to achieve the solution mentioned at
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fser
> verfault.com%2Fquestions%2F220963%2Fpreventing-an-apache-2-server-from
> -logging-sensitive-data&data=02%7C01%7CVikram.Behgal%40basware.com
> %7Ce9ce29eaa7354733e34908d648ce32c0%7C9737b55a445548e48c47a26a6ee65c97
> %7C1%7C0%7C636776447779438126&sdata=aggGhN%2BOVX54EBatu5%2FUDHEUV0
> 4u%2FoFUYf6nBaBH4Ok%3D&reserved=0
> Here are the details of issues :
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeb
> bugs.gnu.org%2Fcgi%2Fbugreport.cgi%3Fbug%3D33292&data=02%7C01%7CVi
> kram.Behgal%40basware.com%7Ce9ce29eaa7354733e34908d648ce32c0%7C9737b55
> a445548e48c47a26a6ee65c97%7C1%7C0%7C636776447779438126&sdata=x5cJK
> dFue%2BEEgtfNm1KvrlGYLjQvSoAbIVkd75RKhoI%3D&reserved=0
>
[...]
>
> Its urgent to me. Please le me know what more information I can provide.
We can help with sed issues, but not with apache issues.
If you have a specific error message generated by sed, please tell us the error.
As written here:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdebbugs.gnu.org%2Fcgi%2Fbugreport.cgi%3Fbug%3D33292%238&data=02%7C01%7CVikram.Behgal%40basware.com%7Ce9ce29eaa7354733e34908d648ce32c0%7C9737b55a445548e48c47a26a6ee65c97%7C1%7C0%7C636776447779438126&sdata=kBisAJICB%2BTGt6l1OT0BrBR9zSmzjbgshLCbhJpcjlo%3D&reserved=0
compared to the ServerFault answer, you have an extraneousness "-i"
parameter that might cause unexpected results.
Did you try running sed without it ?
-assaf
Information forwarded
to
bug-sed <at> gnu.org
:
bug#33292
; Package
sed
.
(Wed, 13 Feb 2019 23:19:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 33292 <at> debbugs.gnu.org (full text, mbox):
tags 33292 notabug
close 33292
stop
Hello,
On 2018-11-12 9:41 p.m., Behgal, Vikram wrote:
> I tried sed without it. Its worked fine.
Thanks for confirming.
I'm thus closing this as "not a bug".
> I just want to give standard input from apache logs to the sed and write output to the file.
> Is there any command to achieve this. Jut for standard input and output rather than reading from file.
>
I can't help with Apache administration,
though perhaps you can use 'sed' outside apache,
after the log files have been created.
-assaf
Added tag(s) notabug.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 13 Feb 2019 23:19:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
33292 <at> debbugs.gnu.org and Assaf Gordon <assafgordon <at> gmail.com>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 13 Feb 2019 23:19:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 14 Mar 2019 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.