Invalid CSRF token

Global guide related discussion. All Windows versions.
Post Reply
philipt95148

Posts: 40
Joined: Fri Sep 11, 2015 11:08 pm
Location:

HTPC Specs: Show details

Invalid CSRF token

#1

Post by philipt95148 » Thu Apr 22, 2021 4:00 pm

I just have a weird message and hope that someone here can help me out.

I have been using EPG Collector to collect TV guide since Feb 2020.
First I run a batch file that goes to Zap2It to download tv guide and create an xml file.
The XML file is then loaded on to EPG Collector and update tv guide for 2 weeks.

I am on Charter cable and use OTA data.
The WMC is running on an HTPC connected to a Linksys router and out to Charter.

This week I have a "Invalid CSRF token" on the batch file run and it terminates ???

The HTPC is set on a NO UPDATE. So no update can get through and upset anything.
The only thing that changed is that last week I upgrade the Linksys router to a faster one, E1200 to AC1200.
Just before the upgrade, I had Charter send me their router to check on speed improvement.

I tried to isolate the issue by a number of options:

1. Plug the HTPC directly to the modem, instead of router
2. Plug the older router back in
3. Run the batch file through a different PC

Still the same error, so somewhere in the communication line, but I am not technical enough to see where it is and how to fix it.

I am hoping that someone here can help me?

TIA

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#2

Post by Space » Thu Apr 22, 2021 4:18 pm

CSRF is related to cookies. This may mean that zap2it has changed something and it now requires secure cookies to be set and returned by your batch job.

philipt95148

Posts: 40
Joined: Fri Sep 11, 2015 11:08 pm
Location:

HTPC Specs: Show details

#3

Post by philipt95148 » Thu Apr 22, 2021 4:48 pm

Thanks for the quick reply.
I went to Zap2It and created a new userid to see if my old one was corrupted but it still result in the error message.
Is this cookie set at Zap2IT or my end as I disallow cookies.
Thanks

renojim

Posts: 13
Joined: Wed Jan 15, 2020 9:06 pm
Location:

HTPC Specs: Show details

#4

Post by renojim » Thu Apr 22, 2021 6:17 pm

Are you using zap2xml.pl? As @Space said, zap2it has changed something an it now requires a CSRF token.
Last edited by renojim on Thu Apr 22, 2021 6:41 pm, edited 1 time in total.

philipt95148

Posts: 40
Joined: Fri Sep 11, 2015 11:08 pm
Location:

HTPC Specs: Show details

#5

Post by philipt95148 » Thu Apr 22, 2021 6:34 pm

Yes I use zap2xml
It runs a .bat file that collects 14 days of tv guide for Over the Air TV
when it finishes, it gives me an xmltv document that updates the guide in WMC.

renojim

Posts: 13
Joined: Wed Jan 15, 2020 9:06 pm
Location:

HTPC Specs: Show details

#6

Post by renojim » Thu Apr 22, 2021 6:45 pm

If you're using the Windows exe, I'm not sure how to update it and I don't know if it's still supported. I modified my Perl file so that it now gets the token, but it's a kludge at this point.

philipt95148

Posts: 40
Joined: Fri Sep 11, 2015 11:08 pm
Location:

HTPC Specs: Show details

#7

Post by philipt95148 » Thu Apr 22, 2021 7:02 pm

Can you show me how to use the perf file?

renojim

Posts: 13
Joined: Wed Jan 15, 2020 9:06 pm
Location:

HTPC Specs: Show details

#8

Post by renojim » Thu Apr 22, 2021 9:07 pm

Try it again. I just tried my modified version and it failed, so I went back to the original version and it worked. I'm not sure what's going on.

philipt95148

Posts: 40
Joined: Fri Sep 11, 2015 11:08 pm
Location:

HTPC Specs: Show details

#9

Post by philipt95148 » Thu Apr 22, 2021 10:50 pm

Yes it works again.
Probably an outage?
Thanks for staying with me on this.
Really appreciated it.

Space

Posts: 2838
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#10

Post by Space » Thu Apr 22, 2021 11:07 pm

Perhaps they have multiple servers and they are rolling out this new login method? It works on the old (not yet updated) servers but fails on the new (updated) servers?

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#11

Post by garyan2 » Fri Apr 23, 2021 12:52 am

Seems like they are looking for ways to break zap2xml now that the author has evidently been warned off (hearsay).
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

renojim

Posts: 13
Joined: Wed Jan 15, 2020 9:06 pm
Location:

HTPC Specs: Show details

#12

Post by renojim » Fri Apr 23, 2021 9:55 pm

Hard to say, but if I can modify zap2xml for the new method then surely there are plenty of other people that can do the same. I'll be keeping an eye on it. For two or three days it requested the token and then it went back to normal.

User avatar
DavidinCT

Posts: 1556
Joined: Mon Feb 13, 2012 3:45 pm
Location:

HTPC Specs: Show details

#13

Post by DavidinCT » Wed Apr 28, 2021 5:03 pm

Still working fine for me, it's all automated with scripts so I don't even think about it any more. I've see no errors for a CSRF token. I will check through my logs to see for any notices.

I do use 2 different accounts. both setup the same, one download a week is from one, the other account is towards the end of the week. Just so I am not pulling all the data all the time on one account.

When It does finally die, EPG123 will be coming my way but, as I have said before. WMC is not my primary DVR any more but, I have a cablecard in it still.
-Dave
Twitter @TheCoolDave

Windows Media Center certified and WMC MVP 2010 - 2012

Post Reply