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

Use $contextpath whenever URLS are used #61

Closed
Krinkle opened this issue May 11, 2011 · 3 comments
Closed

Use $contextpath whenever URLS are used #61

Krinkle opened this issue May 11, 2011 · 3 comments
Labels
Milestone

Comments

@Krinkle
Copy link
Member

Krinkle commented May 11, 2011

Yet another place where $contextpath is not supported in logic/addjob.php, Location-header doesn't prefix $contextpath

I suggest creating a function that returns the path, and not hardcode it anywhere.
That way, you can't forget $contextpath so that I'm redirected to a 404-error, also, it'll make it future proof.

Another one:

Missing $contextpath in logic/run.php on line 7:
header("Location: /run/$user/");

EDIT:
More in logic/wipejob.php:

Please add {$GLOBALS['contextpath']} (or create a function like suggested) for line 34 and line 37
header("Location: /user/" . $_SESSION['username'] . "/");

header("Location: /job/$job_id/");

@Krinkle
Copy link
Member Author

Krinkle commented May 11, 2011

And also in JavaScript (js/run.js)

encodeURIComponent(window.location.protocol + "//" + window.location.host + "?" + params + "&state=");

@Krinkle
Copy link
Member Author

Krinkle commented May 11, 2011

Sorry for the quadruple posting, I grepped for patterns, but variations show up.

Another issue alike in content/addjob.php

<form action="/" method="POST">

and content/jobstatus.php:

<form action="/" method="POST">

@jzaefferer
Copy link
Member

Fixed by #66

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

No branches or pull requests

2 participants