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 URL message in Microsoft Block #2533

Closed
x-iy opened this issue Mar 18, 2024 · 1 comment · Fixed by #2568, #2569 or #2570
Closed

Invalid URL message in Microsoft Block #2533

x-iy opened this issue Mar 18, 2024 · 1 comment · Fixed by #2568, #2569 or #2570
Assignees
Labels
Issue type - bug Bugs in existing code that needs to be fixed. Plugin - block_microsoft Status - PR ready / pending release Dev is done and PR ready. Will be included in the next release.
Milestone

Comments

@x-iy
Copy link

x-iy commented Mar 18, 2024

Moodle 4.1

Plugins
moodle-local_o365 - MOODLE_401_STABLE
moodle-block_microsoft - MOODLE_401_STABLE

Leaving $config->odburl empty in moodle-local_o365 settings results in Invalid URL message in moodle-block_microsoft

moodle-local_o365
o3651

moodle-block_microsoft
o365_2

This is due to the onedrive and notebook urls being malformed here:
https://github.com/microsoft/moodle-local_o365/blob/MOODLE_401_STABLE/classes/rest/unified.php#L491

Which will throw an exception here:
https://github.com/microsoft/moodle-block_microsoft/blob/MOODLE_401_STABLE/block_microsoft.php#L186

Suggest unified::get_group_urls(object) should check if $config->odburl is empty before generating a malformed url for onedrive and notebook.

Resulting malformed urls:
https:///_layouts/groupstatus.aspx?id=xxxxxxx-xxxx-xxxx-xxxxxx&target=notebook
https:///_layouts/groupstatus.aspx?id=xxxxxxx-xxxx-xxxx-xxxxxx&target=documents

@weilai-irl
Copy link
Collaborator

Hi @x-iy

The fix to this issue has been included in release 4.1.7, 4.2.6 and 4.3.4 on 2nd of July 2024. Please check out the latest version of the plugins for the solution.

I'm going to mark this issue as closed.

Regards,
Lai

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