AMF 4.20 getting bad page from SourceForge

25 views
Skip to first unread message

Scott Pakin

unread,
Feb 24, 2018, 3:07:04 AM2/24/18
to AMF Device Detection
My AMF configuration is as follows:

PerlSetEnv AMFMobileHome /var/www/mobilefilter/lite
PerlSetEnv AMFProductionMode true
PerlSetEnv AMFDownloadParamURL true
PerlTransHandler +Apache2::AMFLiteDetectionFilter

Alas, my server has recently been returning "500 Internal Server Error" messages.  Looking in the Apache2 error.log file, I see Perl errors along the lines of "Unescaped left brace in regex is illegal here in regexat /usr/share/perl5/Apache2/AMFLiteDetectionFilter.pm line 370".  Digging deeper, it looks like some file that AMF is trying to download from SourceForge (I don't know which) is complaining about the "browser"'s lack of JavaScript:

<html><head><title>sourceforge</title><!-- <script src="/js/jquery.com/jquery-1.11.0.min.js"></script> --><script src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script src="https://sourceforge.net/js/mirrors.js"></script><script src="/js/sf.js"></script><script>var dr_loc = dr_parse_hash_url();if (dr_loc) {    dr_sf_main(dr_loc);} else {    window.location.href = 'https://sourceforge.net/home.html';}</script></head><body><noscript>we're sorry -- the sourceforge site is currently in disaster recovery mode
and currently requiresthe use of javascript to function.  please check back later.</noscript></body></html>

Could you please look into this?  As a stopgap, I patched AMFLiteDetectionFilter.pm to escape the $pair regular expression (see attached).  This enables my server to function but without proper mobile device detection.

Thanks,
— Scott
AMFLiteDetectionFilter.patch

Idel Fuschini

unread,
Feb 24, 2018, 8:35:33 AM2/24/18
to amf-device...@googlegroups.com
Hi Scott,
I will look ASAP 

I
--
--
You received this message because you are subscribed to the Google
Groups "AMF Device Detection" group.
To post to this group, send email to
amf-device...@googlegroups.com
To unsubscribe from this group, send email to
amf-device-detec...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/amf-device-detection?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "AMF Device Detection" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amf-device-detec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<AMFLiteDetectionFilter.patch>

Idel Fuschini

unread,
Feb 26, 2018, 11:52:23 AM2/26/18
to amf-device...@googlegroups.com
Hi Scott,
I just finished to test your solution, and it's correct.
I will publish today with your fix.

I.

On 24 February 2018 at 14:35, Idel Fuschini <idel.f...@gmail.com> wrote:
Hi Scott,
I will look ASAP 

I

Il giorno 24 feb 2018, alle ore 09:07, Scott Pakin <scot...@pakin.org> ha scritto:

My AMF configuration is as follows:

PerlSetEnv AMFMobileHome /var/www/mobilefilter/lite
PerlSetEnv AMFProductionMode true
PerlSetEnv AMFDownloadParamURL true
PerlTransHandler +Apache2::AMFLiteDetectionFilter

Alas, my server has recently been returning "500 Internal Server Error" messages.  Looking in the Apache2 error.log file, I see Perl errors along the lines of "Unescaped left brace in regex is illegal here in regexat /usr/share/perl5/Apache2/AMFLiteDetectionFilter.pm line 370".  Digging deeper, it looks like some file that AMF is trying to download from SourceForge (I don't know which) is complaining about the "browser"'s lack of JavaScript:

<html><head><title>sourceforge</title><!-- <script src="/js/jquery.com/jquery-1.11.0.min.js"></script> --><script src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script src="https://sourceforge.net/js/mirrors.js"></script><script src="/js/sf.js"></script><script>var dr_loc = dr_parse_hash_url();if (dr_loc) {    dr_sf_main(dr_loc);} else {    window.location.href = 'https://sourceforge.net/home.html';}</script></head><body><noscript>we're sorry -- the sourceforge site is currently in disaster recovery mode
and currently requiresthe use of javascript to function.  please check back later.</noscript></body></html>

Could you please look into this?  As a stopgap, I patched AMFLiteDetectionFilter.pm to escape the $pair regular expression (see attached).  This enables my server to function but without proper mobile device detection.

Thanks,
— Scott

--
--
You received this message because you are subscribed to the Google
Groups "AMF Device Detection" group.
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/amf-device-detection?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "AMF Device Detection" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amf-device-detection+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
<AMFLiteDetectionFilter.patch>

Scott Pakin

unread,
Feb 26, 2018, 12:19:39 PM2/26/18
to AMF Device Detection
Idel,


On Monday, February 26, 2018 at 9:52:23 AM UTC-7, Idel wrote:
I just finished to test your solution, and it's correct.
I will publish today with your fix. 

Thanks, but all my fix does is prevent the Web server from aborting.  Mobile detection still isn't working.  AMF needs some way to download whatever files it needs from SourceForge without receiving that "no Javascript" error from SourceForge.

— Scott

Idel Fuschini

unread,
Mar 4, 2018, 1:26:19 AM3/4/18
to amf-device...@googlegroups.com
Hi Scott,
Can you pls send me your environment, because in my environment I can not reproduce it.

I
--
--
You received this message because you are subscribed to the Google
Groups "AMF Device Detection" group.
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/amf-device-detection?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "AMF Device Detection" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amf-device-detec...@googlegroups.com.

Scott Pakin

unread,
Mar 4, 2018, 9:57:00 AM3/4/18
to AMF Device Detection
Idel,

On Saturday, March 3, 2018 at 11:26:19 PM UTC-7, Idel wrote:
Can you pls send me your environment, because in my environment I can not reproduce it.

What would you like to know?  I'm running Ubuntu 17.10 with Apache 2.4.27 and Perl 5.26.0.  In my initial message, I listed the AMF variables from my configuration file.  Let me know what else I should tell you.

— Scott

Scott Pakin

unread,
Mar 5, 2018, 12:43:10 AM3/5/18
to AMF Device Detection
Idel,

On Saturday, March 3, 2018 at 11:26:19 PM UTC-7, Idel wrote:
Can you pls send me your environment, because in my environment I can not reproduce it.

I just checked, and it looks like the problem has gone away for me, too.  I guess when SourceForge reported, that, "the sourceforge site is currently in disaster recovery mode and currently requiresthe use of javascript to function.  please check back later", this was indeed a temporary condition and has since been resolved.

— Scott

Scott Pakin

unread,
Mar 5, 2018, 1:07:06 AM3/5/18
to AMF Device Detection
On Monday, February 26, 2018 at 9:52:23 AM UTC-7, Idel wrote:
I just finished to test your solution, and it's correct.
I will publish today with your fix.

…and I just pushed out the corresponding AMF 4.21 Ubuntu package to ppa:pakin/other.

— Scott

Ali Nebi

unread,
Mar 5, 2018, 4:53:29 AM3/5/18
to amf-device...@googlegroups.com
Hi guys,

It looks like Sourceforge is often in such state. I would like to suggest to use another place from where the config files to be downloaded. I don't see sourceforge down for first time and when this happens config files are full with bad content (JS code).

Regards,
Ali Nebi

--
--
You received this message because you are subscribed to the Google
Groups "AMF Device Detection" group.
To post to this group, send email to
amf-device-detection@googlegroups.com
To unsubscribe from this group, send email to
amf-device-detection+unsub...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/amf-device-detection?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "AMF Device Detection" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amf-device-detection+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Iguana Information Technologies, SL
Bulevar Manzanares 6 - C4
28701 San Sebastián de los Reyes, Madrid
España (Spain)
+34 915569100
+34 649336286
http://www.iguanait.com/

Advertencia
-----------
Este mensaje contiene información privada y confidencial. Si usted
no es el destinatario, no está autorizado a leer, imprimir, retener,
copiar o difundir este mensaje o parte de él. En caso de que usted
reciba este mensaje por error debe borrarlo. Gracias.

Confidentiality notice
----------------------
This message contains private and confidential information. If you
are not the named addressee, you are not authorized to read, print,
retain, copy or disseminate this message or any part of it. In case
you receive this message by mistake you should delete it. Thanks.

Idel Fuschini

unread,
Mar 12, 2018, 10:56:22 AM3/12/18
to amf-device...@googlegroups.com
Hi all,
I have done many test with same environment of scott, but no problem found.
temporary problem of sourceforge.
regards
I.

On 5 March 2018 at 10:53, Ali Nebi <an...@iguanait.com> wrote:
Hi guys,

It looks like Sourceforge is often in such state. I would like to suggest to use another place from where the config files to be downloaded. I don't see sourceforge down for first time and when this happens config files are full with bad content (JS code).

Regards,
Ali Nebi
On Mon, Mar 5, 2018 at 8:07 AM, Scott Pakin <scot...@pakin.org> wrote:
On Monday, February 26, 2018 at 9:52:23 AM UTC-7, Idel wrote:
I just finished to test your solution, and it's correct.
I will publish today with your fix.

…and I just pushed out the corresponding AMF 4.21 Ubuntu package to ppa:pakin/other.

— Scott

--
--
You received this message because you are subscribed to the Google
Groups "AMF Device Detection" group.
To post to this group, send email to
amf-device-detection@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/amf-device-detection?hl=en_US?hl=en

---
You received this message because you are subscribed to the Google Groups "AMF Device Detection" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amf-device-detection+unsubscrib...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages