JavaScript infused RSS feeds from pubs.aip.org

  • [X] I’m not using docker on my primary instance, but my issue can be reproduced on the aforementioned docker setup and/or official demo.

RSS Feeds from pubs.aip.org cannot be parsed. Issue reproduced by using the online demo instance of tt-rss. For instance the following link
https://pubs.aip.org/rss/site_1000117/1000061.xml
loads on a web browser but not on tt-rss.

Feed parser gives clues as to what is happening. Below is what is received by the feed parser. As far as I can tell the website is trying to set up a cookie through JavaScript before serving the actual rss content.

Is there a work around to this issue or should I get in touch with the publisher and ask them to remove the cookie setting JavaScript?

<html><head><script type="text/javascript"><!--
function leastFactor(n) {
 if (isNaN(n) || !isFinite(n)) return NaN;
 if (typeof phantom !== 'undefined') return 'phantom';
 if (typeof module !== 'undefined' && module.exports) return 'node';
 if (n==0) return 0;
 if (n%1 || n*n<2) return 1;
 if (n%2==0) return 2;
 if (n%3==0) return 3;
 if (n%5==0) return 5;
 var m=Math.sqrt(n);
 for (var i=7;i<=m;i+=30) {
  if (n%i==0)      return i;
  if (n%(i+4)==0)  return i+4;
  if (n%(i+6)==0)  return i+6;
  if (n%(i+10)==0) return i+10;
  if (n%(i+12)==0) return i+12;
  if (n%(i+16)==0) return i+16;
  if (n%(i+22)==0) return i+22;
  if (n%(i+24)==0) return i+24;
 }
 return n;
}
function go() {
 var p=1820527054580; var s=3168778397; var n;
if ((s >> 6) & 1)/* 120886108*
*/p+=/*
p+= */114777825* 9;	else  p-=/*
*13;
*/178328879*/*
*13;
*/7;
if ((s >> 11) & 1)
p+=/*
p+= */109822196*/*
else p-=
*/12; else /* 120886108*
*/p-=161508685*/*
p+= */12;
if ((s >> 12) & 1) p+=56344187*/*
else p-=
*/15;/* 120886108*
*/else p-= 125639140*	13; if ((s >> 12) & 1)p+=75799891*/*
p+= */15;else p-=/* 120886108*
*/93487623*
13;
if ((s >> 3) & 1)/*
*13;
*/p+=/*
p+= */116780992*4; else /* 120886108*
*/p-=/* 120886108*
*/171541112*/*
p+= */4;  p-=4365004470;
 n=leastFactor(p);
{ document.cookie="KEY="+n+"*"+p/n+":"+s+":4167689412:1;path=/;";
  document.location.reload(true); }
}
//--></script></head>
<body onload="go()">
Loading...
</body>
</html>

They’re doing something silly, and need to fix their stuff.

1 Like

absolutely no javascript in feeds.