Commit Graph

29 Commits

Author SHA1 Message Date
M. Zulqarnain
42fc6aef03 Upgrade django-ipware (#24827) 2021-02-23 18:14:17 +05:00
Jawayria
62bc555817 Applied pylint-amnesty to track 2021-02-03 13:10:42 +05:00
Tim McCormack
e0e03dec5f Use more appropriate hash when making tracking ID; document SECRET_KEY use (#26134)
- Make it easier to rotate `SECRET_KEY` by documenting this usage
  for both sensitivity and rotation process. (ARCHBOM-1676).
- Just use a hash of the secret rather than HMAC + MD5. We're not
  authenticating a message, so HMAC isn't really needed -- it just needs
  to be unique, deterministic, and irreversible. SHAKE allows generation
  of an arbitrary length hash without needing to truncate.

Also, rename tracking session ID generator for clarity -- there's no
encryption happening here.

Add additional test for existing claim of uniqueness.
2021-01-27 14:13:42 +00:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Aarif
97d327feeb BOM-1121
Old style mixin compatibility with django2.2
2020-01-30 16:36:02 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Jeremy Bowman
6f18383142 Fix bytes/string handling in tracking middleware 2019-09-18 11:59:24 -04:00
Amit
40068aecb5 INCR-232: Run python-modernize and isort on common/djangoapps/track (#20513) 2019-05-10 12:05:31 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Syed Hassan Raza
0d6e0ac779 Add latin1 decoding to HTTP Headers 2016-03-08 12:44:55 +05:00
Syed Hassan Raza
de91ceaae2 Fix HTTP_USER_AGENT latin1 characters 2016-01-20 18:40:09 +05:00
Bill DeRusha
40a8608b0b Upgrade IP parsing in tracker middleware 2015-10-08 13:48:53 -04:00
aamir-khan
282b9449a4 ECOM-2150: Added the ga client fetching as a customer header in middleware 2015-09-09 14:50:12 +05:00
aamir-khan
a59be0f7f4 ECOM-1947: updated the middleware to exclude the password strings from event logging 2015-07-30 11:52:07 -07:00
Piotr Mitros
cf719a40ba Add referer and accept_language to tracking logs
3 line patch, together with a world of pain due to buggy code, broken abstractions in tests, etc.
2015-02-11 13:35:27 -05:00
stv
4d30aedf4e Fix PEP8: E127 continuation line over-indented
for visual indent
2014-11-24 20:46:50 -05:00
stv
1164624fbc Fix PEP8: W291 trailing whitespace 2014-11-10 19:31:09 -08:00
Renzo Lucioni
79461722de Re-use GA cookie when sending server-side events to Segment.io 2014-08-21 10:47:35 -04:00
Brian Wilson
119d7768bf Also use md5 for constructing key for hmac. 2014-06-02 12:31:44 -04:00
Brian Wilson
919b433847 Encrypt the session id before writing to tracking logs. 2014-06-02 11:03:41 -04:00
Gabe Mulley
36269bd5a8 Integrate event-tracking in to the LMS
Support incremental conversion of events from the old API to the new, in order to ensure the new system is working, enrollment events have been modified to make use of the new API.
2014-05-01 14:04:35 -04:00
Gabe Mulley
4f4e58b5f6 add user_id to tracking context
AN-213
2013-10-29 08:18:01 -04:00
Gabe Mulley
d2b03e28fb add course_id to event context 2013-10-17 17:44:01 -04:00
Gabe Mulley
761a4dcc97 Make URL patterns to exclude from tracking configurable
* Add unit test coverage for this "exclusion from tracking" logic
* Exclude based on regex match instead of raw string comparison
* Exclude heartbeat requests from tracking
2013-09-13 11:24:51 -04:00
Ned Batchelder
181b1e979b Remove unused imports from common, as reported by pylint. 2013-06-19 16:56:34 -04:00
Calen Pennington
1d1a9173a4 Cleaning up pep8 violations 2012-07-23 14:44:40 -04:00
Piotr Mitros
0fb8a7b1c8 Middleware password fix. Needs Cale's cleanup 2012-07-20 16:38:45 -04:00
Calen Pennington
8134bcbc3d Get the cms up to the point of rendering a template 2012-06-08 14:01:41 -04:00