Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid referring URL error on Chrome only #461

Open
marcnyc2001 opened this issue Feb 7, 2024 · 2 comments
Open

Invalid referring URL error on Chrome only #461

marcnyc2001 opened this issue Feb 7, 2024 · 2 comments

Comments

@marcnyc2001
Copy link

Hello, I am running WebCalendar Version 1.2.7 and every time I try to edit or add an entry on Chrome I get a white error page saying "Invalid referring URL" generated by /calendar/edit_entry_handler.php
The strange thing is that on Safari it works fine, but the same computer with the same IP on Chrome shows that error every time.
How can I fix this?

@max951
Copy link

max951 commented Feb 7, 2024

Did you change something in the config or does this concern a new installation?

If you have switched from http to https:
Maybe this will help: #69
or the #208

@marcnyc2001
Copy link
Author

marcnyc2001 commented Feb 7, 2024

I haven't changed anything in a while but it's been happening in a while, so, after reading #69 I have a feeling it's because we have added a second domain, so I commended that die_miserable_death line and it worked. Thank you!

`if ( ! preg_match ( "@$SERVER_URL@i", $_SERVER['HTTP_REFERER'] ) ) {

// Gotcha.  URL of referring page is not the same as our server.

// This can be an instance of XSRF.

// (This may also happen when more than address is used for your server.

// However, you're not supposed to do that with this version of

// WebCalendar anyhow...)

//die_miserable_death ( translate ( 'Invalid referring URL' ) );

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants