Giter VIP home page Giter VIP logo

cqu-kb's People

Contributors

0xseanll avatar hagb avatar loopyme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

loopyme hagb

cqu-kb's Issues

A wired character `Ò»` caused the program to crash

Traceback (most recent call last):
  File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/mc/.local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/mc/.local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app.py", line 14, in get_ical
    server_main(username, password, path)
  File "/home/mc/.local/lib/python3.6/site-packages/cqu_kb/__main__.py", line 11, in server_main
    main(username, password, path)
  File "/home/mc/.local/lib/python3.6/site-packages/cqu_kb/__main__.py", line 32, in main
    data=get_payload(student)
  File "/home/mc/.local/lib/python3.6/site-packages/cqu_kb/core.py", line 118, in get_cal
    day = chinese_to_numbers[course['time'].split('[')[0]]
KeyError: 'Ò»'

This only appears in some special cases. The character may come from the trash website.

部分日历软件无法正确读取同时带时区(`TZID`)和`VALUE`属性的时间

比如锤子日历(当然这是它们的锅)。
另见 collective/icalendar#75
在一个同类项目里为了兼容这部分软件,我使用了以下 workaround 来把VALUE去掉同时保留时区。

from icalendar import vDDDTypes
def add_datetime(component, name, time):
    vdatetime = vDDDTypes(time)
    if 'VALUE' in vdatetime.params and 'TZID' in vdatetime.params:
        vdatetime.params.pop('VALUE')
    component.add(name, vdatetime)
...

add_datetime(event, 'dtstart', event_start_datetime)
add_datetime(event, 'dtend', event_end_datetime)

新系统

换了新的选课系统,用的是统一认证号了,失效了

Potential security problems

Here are potential problems:

  1. The public subscription server is not using HTTPS, besides the default HTTP method is GET. It can be easily MITM attack and cause user's credential leak.
  2. This repo is not using any encryption with user's password, it can be stolen by malwares easily.

Maybe you can consider:

  1. Using nginx/caddy to provide HTTP service with reliable HTTPS, using this repo as an upstream.
  2. Provide user graphical interface (web page frontend) for user. In this way you can change GET method to POST to ensure the security. (Credential information should not using GET method to submit)
  3. Implementing master-key mechanism or not saving password to protect user's password.

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.