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

$mapData getFullURL won't work with img_auth.php #81

Closed
YOUR1 opened this issue Oct 19, 2023 · 1 comment
Closed

$mapData getFullURL won't work with img_auth.php #81

YOUR1 opened this issue Oct 19, 2023 · 1 comment

Comments

@YOUR1
Copy link
Contributor

YOUR1 commented Oct 19, 2023

I wanted to highlight a potential flaw in the extension code. Specifically, there's an issue with how files are accessed, which fails in wikis with private configurations or those using img_auth.php.

In the current implementation, the file retrieval method assumes direct access to the file's URL:

$mapData = file_get_contents( $files['map']->getFullUrl() );

However, this approach doesn't work when img_auth.php is used, as direct URL access is restricted, and proper authentication processes are not followed in the code, leading to failed retrievals.

For environments where file access is regulated through img_auth.php, the method getLocalRefPath() should be considered for use, since it obtains files from the local path, avoiding unauthorized access issues.

Could this be adjusted to accommodate private or restricted-access wikis?

YOUR1 added a commit to YOUR1/diagrams-extension that referenced this issue Oct 19, 2023
@samwilson
Copy link
Owner

This bug is part of #61.

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

Successfully merging a pull request may close this issue.

2 participants