-
Notifications
You must be signed in to change notification settings - Fork 6
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
Lectio is password protected #24
Comments
It's a great question. I'm currently unsure if I should proceed to try to solve this problem. However I don't feel comfortable asking people to provide me with their login details. |
Perhaps make it possible for users to save or pass the credentials as plain text? |
Hi Hanse00. - and other python clever people. I also have the problem with the password proteced Lectio. Since I work 2-3 places I am greatly depended on my calender and not having lectio in my Goggle calender (and thus on my phone) makes me weep every day!! o_o I have/had the working version of a script, usually I open cmd as administrator and then run a line of program. I know absolutely nothing about python - but can open and read a script and "pseudo code". Or, perhaps a new "run" file can contain dummies, like %write your user here% and %write your password here% and then contain the old call, {mine is: lectocal.run (school_id) teacher (id)} somehow? Just if a brand new script file is easier to write for LecToCal master. Regards, |
Hey Charlotte and Jakup, Thank you for your comments. I want to make one thing perfectly clear for you, and anyone else who might bring this up: You've both outlined possible strategies for LecToCal to collect people's Lectio credentials, and use them on their behalf. However no matter how we go about this, via a text file or by entering the details directly into the parameters of the script, this implies the script must have your Lectio credentials in memory at one time or another. If I @Sobuno or I were unethical people, we could find ways to abuse this, and compile a list of your Lectio login details. This would allow us write nasty messages to other people, delete assignments, or otherwise abuse your access. Whilst I appreciate you may trust me with this information, the fact of the matter is you shouldn't, and I wouldn't. Due to the design of Lectio there doesn't seem to be any alternative to this solution. This is then the dilemma I am left with:
Currently I am leaning towards the first option, as much as I understand it wouldn't be great for any users of the software. Unless something drastically changes my mind, I don't think it would be morally defendable of me to do option 2. |
Thanks for commenting on this |
Whilst you're correct that the code is available to be read here, you have no guarantee that the package on pypi actually contains the code in the repository. I could easily inject some bad code before publishing a build. Of course if you download the code and build it yourself, I couldn't do that. However I think it's safe to assume that the majority of users, do it the way that's easiest.
I'm not sure if I agree with this. Ideally you should know what you're doing true, but as the publisher of this product, I believe it's ultimately my responsibility to ensure it's secure. As with any other digital or physical product, you may happen to know something about it, but the dealer is accountable for not selling you unsafe products.
You're correct in your understanding. As I see it there's a terrible solution, or no solution. There's no good solution here. I'll have to think about it a bit more, before I can decide if I want to move forward with this. |
Hi Hanse00 -and other readers I am sorry if I by this next comment show my lack of understandig but -why would the package be unsafe? I mean, I have python on my computer and I run the script on it here. As far as I know, i have downloaded the packages and they are also "here" -(I have tried reading them to see if I understand how the magic works..) What i dont get is, that if I edit my version of the script I run on my PC, to contain hard-coded my username and password, could it not be done in the same manner as my google information? I mean, the authentification makes a json file, this saves my user-password information on this pc, does it not? So I hope that somehow the LecToCal can work again, and I guess I am willing to take the chance with my information. Regards Charlotte |
I've uploaded a modified version of the |
I made modified version where you enter a cookie (copied from a browser). This has two security advantages:
It has a few of obvious disadvantages:
I can share the code, if you would like. Regards, Jens |
Fantastic news! For me automatic sync with login stored in text is preferable, but nice that so many options are suddenly available |
@jensjacobt do you have any idea how long it takes for the cookie to expire if you don't actively log out? I think the most secure option here might be for the script to automatically open up the login page, if the cookie isn't present, let the user log in, and then grab the cookie to save together with the OAuth2 credentials. That way we can prevent the user providing the credentials directly to the script. |
@charlotdk I want to address a few of your comments: You mention your Google account credentials being "unsafe". The problem is that Macom doesn't provide any similar mechanism for Lectio. So it's all or nothing, as soon as I have your password, I can do anything.
I need to drive home a point about this opinion, because I've heard it from multiple people. If something did somehow go wrong, I could be held legally liable for any damages. I know the IT industry has taught users bad habits over the last 20 years, with IT support staff asking people their passwords, so they can look into an issue on your behalf. I work in that industry myself, and that's what has lead me to the very strong opinion that you should never ever under any circumstances share your password with anyone. I'm sorry that that opinion is inconvenient, but sometimes you have to choose your battles, and I've decided I will not be a part of this terrible industry practice which needs to stop. It looks like @jensjacobt might be onto a path which might allow the script to work again, without you needing to enter your password directly into it. If we can figure something out along those lines, I will happily work on making that happen, but I will not be a part of teaching people to indiscriminately sharing their passwords with 3rd parties.
I absolutely agree that Macom needs to give people access to their schedules in whatever way works for them, but it looks like they have close to a monopoly status in Denmark, so there's not much reason for them to listen. You're more than free to contact them if you're interested, their details can be found at http://macom.dk/publish/da/lectio.htm |
Hi Hanse00 Yes, unfortunately Macom has a practically monopoly status, and this sadly means that thousands of people (all teachers, staff, and students) everyday must suffer this and other inconveniences. For me, working two part-time jobs it is complicated. I do regularly contact Macom and point out the lack of an actual calendar function, but the reply ranges from "this is a new complaint" to "not a priority right now" and, for some weird reason, some of the Lectio schedule appointments do show up in a calendar, at my school it is Outlook, only it shows up 3 times duplicated, making a week-overview impossible and the regular classes do not appear there. Thank you all for your comments and help. I will stay tuned. |
Thanks everyone for your input. I had a look over the Google Cloud Console, which has some built in metrics for the program's use of the Google Calendar API. Over the last 30 days, calendar.calendarList.list has been called 5,461 times. That's significantly more than I would have expected. With that information at hand, I think it's worthwhile trying to keep the system alive. With that in mind however, it seems like keeping this system working might become somewhat of a battle against MaCom in the long run, and I'll have to make periodic updates to keep it working. However for me to be able to dedicate significant time to this project, I will have to find a way for it to make sense financially. I'll have to think a bit about what I can do in that regard. |
(Hi @Hanse00 . Sorry if you feel this reply is inappropriate for the thread. Feel free to delete if you think it crosses the line of good internet behaviour.) @charlotdk (and others). I use (and administrate) another tool, build with Node.js. You can find it here: It opens up a webserver that you can query for your schedule, and it will give you an .ics file. How you use that file afterwards is up to you, but you could upload that file manually to your Google Calendar. I personally have an automated setup, which is outlined in the documentation. It is an option if you need it. If you can get LecToCal or another tool to work for you, that's cool too. Cheers |
The cookie takes a least 50 minutes to expire, if you don't load another page. However, the cookie is reset every night, so you can't have the script running automatically for more than one day. I've made a version of the script that lets you login via command prompt (hidden password similar to ssh and so on) and saves the cookie to disk. This uses the flag --login. The script can then update the schedule for the rest of the day without user interaction (but via cronjob). @Hanse00, let me know, if this has interest. |
Thanks @jensjacobt that seems quite interesting. Is your script available on GitHub or elsewhere? I see that there's a need to continue developing this tool for the time being, however as I am no longer an active participant of the Danish educational system, I don't have any lectio credentials of my own that I can test with. I will need to find someone to work with, who can help me actually test the functionality of the script, otherwise I am more or less coding blind. |
Hello Hanse00 I have only "been in the system" for a short amount of time, and it has only been closed (password protected) for a few months, so I do not see a big problem with this. Though I do not do it lightly :) The problems of not-having-a-calendar are much more clearly and disturbs me every day, so if you have or soon have a fix to test, I am your man (unisex). Before all of this broke down I was trying to change the 4 weeks to something more like 8 or whatever, since I still try and work 2 jobs (it is not going well). But my python-skills are poor and some find all my questions annoying... GG . !!!!! (sorry, I have made a new issue in what I hope is the proper place for such a thread) !!!! Has anyone in here got the "new quick-n-dirty Lectio.py" to work for them? Is there a trick I simply do not understand? Best |
I have now put in a pull request with the updates I talked about. This uses some of the code from chubby1968 but it doesn't store the password. It is working from my command-line. My short comments are these:
Edit: I haven't worked with Pipenv before. The Piplock.file isn't updated with the new packages that were used. Can you help me with that, Hanse00? |
Do you have plans to update LecToCal following Lectio's move to password-protected schedules?
The text was updated successfully, but these errors were encountered: