Commit Graph

22621 Commits

Author SHA1 Message Date
Usman Khalid
62ed654b31 Convert LTIModule into LTIBlock. (#25713) 2021-02-16 09:09:13 -05:00
Ali-D-Akbar
c3bfe323de PROD-2195 2021-02-16 18:09:38 +05:00
Ali-D-Akbar
2e5b2704a2 PROD-2191 2021-02-16 18:06:18 +05:00
Ali-D-Akbar
86ce42abb7 PROD-2194 2021-02-16 17:40:47 +05:00
zia.fazal@arbisoft.com
9420423e1a Added annotations for EMBARGO feature flag 2021-02-16 15:19:17 +05:00
SaadYousaf
50e71479ee [TNL-7729] - Add check to discussion rest API to prevent users in blackout period. 2021-02-16 14:08:56 +05:00
Robert Raposa
0517603b6d feat: 403 logging for exchange_access_token (#26511)
The mobile app is getting unexpected 403s from
/oauth2/exchange_access_token/, but we have been unable
to pinpoint from where they are coming. This commit
introduces a temporary exception handler to provide stack info
for 403s on this endpoint to try to track down the source.

Requires the ENABLE_403_MONITORING setting to be set to
True to enable the logging.

ARCHBOM-1667
2021-02-12 15:34:55 -05:00
Felipe Montoya
f02d16ec3f Merge pull request #26428 from jramnai/tsd-login_attempts_annotations
[TSD] add annotations for login failure settings and feature flags
2021-02-12 14:36:56 -05:00
Felipe Montoya
b39f1a1727 Merge pull request #26492 from jramnai/tsd-language_selector
[TSD] add annotation for the header & footer language selector
2021-02-12 13:50:34 -05:00
Olivia Ruiz-Knott
5c95258115 Merge pull request #26461 from edx/ork/MICROBA-989_notify-credentials-takes-usernames
feat: allow notify_credentials to take a list of usernames
2021-02-12 10:45:15 -05:00
Felipe Montoya
467575443c Merge pull request #26266 from BbrSofiane/bbrsofiane/tsd-comprehensive_theming_settings
[TSD] Annotate comprehensive theming settings
2021-02-12 10:44:37 -05:00
Manjinder Singh
a5e3675ce2 docs: annotate comprehensive theming settings 2021-02-12 15:05:55 +00:00
Feanil Patel
6fb93463a8 refactor Replace django-ratelimit-backend with django-ratelimit
We use django-ratelimit to limit per IP login attempts, and then we use
django-ratelimit-backend to limit per username login attempts. This
change replaces the usage of django-ratelimit-backend with another
instance of django-ratelimit so that both limits can be managed by one
library.

This is the first step in being able to fully excise
django-ratelimit-backend from edx-platform. Note that we're still using
the `RateLimitMixin` in openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py
because studio and the admin UI still relies on that for rate limiting.
Those login paths will have to be updated before we can remove the mixin
from our auth backend.
2021-02-12 09:52:13 -05:00
Carla Duarte
ab0fa47865 Merge pull request #26457 from edx/ciduarte/AA-511
AA-511: update dashboard certificate button styling
2021-02-12 09:48:39 -05:00
Jayram
67c5cca44b docs: add annotations for MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS settings
docs: added related settings description for login attempts
2021-02-12 20:16:43 +05:30
Bianca Severino
1d667e8b0f Add onboarding status view to instructor dashboard 2021-02-11 15:32:13 -05:00
Felipe Montoya
111fbbca8b Merge pull request #26469 from msaqib52/saqib/TSD-ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA
[TSD] add annotations for ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA feature flag
2021-02-11 14:24:48 -05:00
Feanil Patel
4cef913a85 Merge pull request #26489 from edx/feanil/flaky_anon_id_test
test: Don't add a delta to ensure we get rate limited.
2021-02-11 14:16:07 -05:00
David Ormsbee
691472e475 [feat]: Don't use Mathjax if an HTMLBlock has no math. (#26478)
Mobile apps load HTML (and other) XBlocks individually using the
render_xblock endpoint. This is an attmept to reduce the number
of requests and JS processing needed to do so by detecting when
we have math content in HTMLBlocks and only adding the Mathjax
resources when necessary.

This is controlled by the "courseware.optimized_render_xblock"
CourseWaffleFlag. For maximum safety, we currently only optimize
in this way when directly hitting HTMLBlocks, and not for
ProblemBlock or VerticalBlock.

This was made as part of edX's Hackathon XXV.
2021-02-11 13:31:17 -05:00
Jayram
b1a101902f docs: add annotations for SHOW_FOOTER_LANGUAGE_SELECTOR feature flag 2021-02-11 23:01:25 +05:30
Jayram
5e678ab6d6 docs: add annotations for SHOW_HEADER_LANGUAGE_SELECTOR feature flag 2021-02-11 22:59:22 +05:30
Feanil Patel
6f1691e5b6 test: Don't add a delta to ensure we get rate limited.
The rate limiting library computes the rate limit by chunking time since
the epoch into chunks of whatever your period is. It then adds some
consistent offset based on your key.  This means that at certain times,
you are closer to the end of your rate limit time period than others.
So moving 1 minute into the future would put you into the next time
chunk and your rate limit would be reset.

I updated the test to test rate limit at the same time as the initial
call to ensure that we don't end up on the other side of a time chunk
boundary by accident.  We were seeing times in CI where it
would occasionally fail because time chunking wasn't in our favor.
2021-02-11 11:32:49 -05:00
Aarif
01ac3c2ed3 replaced unittest assertions pytest assertions (#26308) 2021-02-11 17:41:41 +05:00
Bianca Severino
2e72791491 Create command to update expiration_date for old SoftwareSecurePhotoVerification entries (#26471) 2021-02-10 16:55:51 -05:00
alangsto
9104983369 update edx-proctoring version (#26472)
updated for quality
2021-02-10 13:41:17 -05:00
Jayram
5ac505d5d0 docs: add annotations for ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF feature flag 2021-02-10 19:35:38 +05:30
Saqib
e014535dd8 add toggle annotations for ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA feature flag 2021-02-10 17:59:34 +05:00
Manjinder Singh
cd60646926 fix: Switch anonymous user ID hash from md5 to shake (#26198)
Now that we always return an existing value from the DB rather than trusting that ID generation is deterministic and constant over time, we're free to change the generation algorithm.

Our long term goal is to switch to random IDs, but we need to first investigate the uses of save=False. In the meantime, this is a good opportunity to move away from MD5, which has a number of cryptographic weaknesses. None of the known vulnerabilities are considered exploitable in this location, given the limited ability to control the input to the hash, but we should generally be moving away from it everywhere for consistency.

This change should not be breaking even for save=False callers, since those calls are extremely rare (1 in 100,000) and should only occur after a save=True call, at which point they'll use the stored value. Even if this were not true, for a save=False/True pair of calls to result in a mismatch in output, the first of the calls would have to occur around the time of the deploy of this code.

Co-authored-by: Tim McCormack <tmccormack@edx.org>
 
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2021-02-10 07:37:27 -05:00
oliviaruizknott
0533ecc814 feat: allow notify_credentials to take a list of usernames 2021-02-09 17:04:21 -05:00
Feanil Patel
a482bc15e3 Merge pull request #26441 from edx/feanil/make_rate_limit_errors_429s
Make rate limit errors 429s instead of 403s
2021-02-09 15:07:22 -05:00
Alexander J Sheehan
e9175c2338 Merge pull request #26444 from edx/alex-sheehan-edx/use-the-right-integrated-channels-task
replace bulk transmission task to intended single learner task
2021-02-09 12:28:50 -05:00
Alexander Sheehan
aaa375077c replace bulk transmission task to intended single learner task 2021-02-09 11:55:22 -05:00
Carla Duarte
f4c4a9be96 AA-511: update dashboard certificate button styling 2021-02-09 11:28:37 -05:00
Christie Rice
7db147e06a Fix lint-amnesty warnings (#26412) 2021-02-09 10:20:46 -05:00
Jayram
3127e5f7af docs: add annotations for ENABLE_DASHBOARD_SEARCH feature flag 2021-02-09 20:27:12 +05:30
Jayram
69e041b1eb docs: add annotations for ENABLE_COURSEWARE_SEARCH feature flag 2021-02-09 20:23:02 +05:30
Christie Rice
997e31b56b MICROBA-918 Check the allowlist when regenerating certificates, and stop incidentally modifying the certificate invalidation list (#26439) 2021-02-09 09:47:33 -05:00
Carla Duarte
7f7edd93c7 Merge pull request #26440 from edx/ciduarte/AA-590
AA-590: pass translated tab titles to MFE
2021-02-09 08:57:10 -05:00
usamasadiq
1e2aa1dec5 Apply manesty to convention warnings 2021-02-09 17:09:19 +05:00
Carla Duarte
00a025f073 AA-590: pass translated tab titles to MFE 2021-02-08 17:00:33 -05:00
Matt Hughes
02d0b474e7 Merge pull request #219 from edx/matthugs/EDUCATOR-5555-a11y-js-code-for-notes-needs-to-handle-tags-better
Fix XSS vector for a11y text attached to notes editor
2021-02-08 16:54:49 -05:00
Tim McCormack
80a4437f33 fix: Always save generated anonymous user ID in DB; ignore save=False (#26399)
This deprecates `save=False` for several functions and removes all known
usages of the parameter but does not actually remove the parameter.
Instead, it will emit a deprecation warning if the parameter is used.
We can remove the parameter as soon as we feel sure nothing is using it.

Now that we have refactored `anonymous_id_for_user` to always prefer
retrieving an existing ID from the database -- and observed that only a
small fraction of calls pass save=False -- we can stop respecting
save=False. This opens the door for future improvements, such as generating
random IDs or switching to the external user ID system.

Metrics: I observe that 1 in 16 requests for new, non-request-cached
anon user IDs are made with save=False. But 71% of all calls are served
from the request cache, and 99.7% of the misses are served from the DB.
save=False only appear to come from intermittent spikes as reports are
generated and are low in absolute number.

Also document usage/risk/rotation of secret in anonymous user ID
generation as indicated by `docs/decisions/0008-secret-key-usage.rst`
ADR on `SECRET_KEY` usage.

ref: ARCHBOM-1683
2021-02-08 19:16:05 +00:00
Feanil Patel
cfca652dee feat: Add paths to easily view various error pages.
Currently it's hard to see the content of an error without knowing how
to cause an existing view to make that error in production.  Adding
these default paths should make that a lot easier.
2021-02-08 14:03:26 -05:00
Feanil Patel
cd3e4353b1 feat: Add a 403 and 429 handler.
See context here: https://django-ratelimit.readthedocs.io/en/latest/cookbook/429.html#context

For now we continue to fall back to django's default 403 handler for 403
but provide a new 429 template that we use for ratelimit exceptions.

This commit also updates a logistration test that relied on the old 403
behavior of django-ratelimit instead of the newly added 429 behavior.
2021-02-08 14:03:26 -05:00
Bianca Severino
54505b82c4 Merge pull request #26436 from edx/bseverino/proctoring-check-fix
[MST-645] Account for no enrollment in courseware rules
2021-02-08 13:39:40 -05:00
Carla Duarte
a3f0050c4d Merge pull request #26396 from edx/ciduarte/depr-keys
AA-650: block deprecated keys from course home MFE
2021-02-08 13:27:58 -05:00
Bianca Severino
4fb36709a5 Account for no enrollment in courseware rules 2021-02-08 13:12:52 -05:00
Carla Duarte
8d2d78dc61 AA-650: block deprecated keys from course home MFE 2021-02-08 13:00:36 -05:00
Feanil Patel
03d2d983ea Merge pull request #26392 from edx/feanil/rate_limit_anon_csv
Feanil/rate limit anon csv
2021-02-08 12:05:21 -05:00
Christie Rice
367d2a07c9 Fix lint-amnesty warnings (#26411) 2021-02-08 10:49:32 -05:00