Giter Site home page Giter Site logo

Comments (8)

bret-miller avatar bret-miller commented on August 16, 2024

OK, to further suggest this is a security issue, I am able to use the URL from the block to send a message from a different computer without ever logging into the site or displaying the course. The URL (without domain name) is:
https://xxxx/blocks/messageteacher/message.php?courseid=8&referurl=https%3A%2F%2Fxxxx%2Fcourse%2Fview.php%3Fid%3D8&recipientid=5

from moodle-block_messageteacher.

marxjohnson avatar marxjohnson commented on August 16, 2024

I've attempted to reproduce this, but cannot. message.php calls require_login(), so any attempts to access the page (either loading the form via AJAX or directly entering the URL) are redirected to the login form.

from moodle-block_messageteacher.

bret-miller avatar bret-miller commented on August 16, 2024

I hate to post this here, but [redacted] gives me the message page without logging in.

from moodle-block_messageteacher.

marxjohnson avatar marxjohnson commented on August 16, 2024

Got it, thanks. I didn't have guest access enabled while I was testing. I'll look into it.

from moodle-block_messageteacher.

marxjohnson avatar marxjohnson commented on August 16, 2024

I've just pushed a fix which checks for moodle:site/sendmessage capability. The guest user doesn't have this by default, so this should fix the problem. Please can you test it and confirm for me?

from moodle-block_messageteacher.

bret-miller avatar bret-miller commented on August 16, 2024

Well, it didn't help. I took the time to look at the code and I don't understand why it's not blocking the message form. That should throw an access exception when using guest access, but it's not--at least not visibly.

from moodle-block_messageteacher.

marxjohnson avatar marxjohnson commented on August 16, 2024

The only reason I can think that it would allow the page to be viewed by guest is if, for some reason, the Guest role has the moodle:site/sendmessage capability enabled.

from moodle-block_messageteacher.

bret-miller avatar bret-miller commented on August 16, 2024

It doesn't. I checked. It was "not set". I changed it to "prohibit" in case that would help, but it didn't help either.

from moodle-block_messageteacher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.