If an incomplete utf-8 byte sequence comes at the end of an input
string, Iconv with //IGNORE will still include that incomplete sequence
in the output, causing psql errors among other problems. This new method
pads the string with spaces to work around the problem.
refs #10188
Change-Id: Idacae010462f2b98c02afbe4103974f39c0f24c1
Reviewed-on: https://gerrit.instructure.com/13258
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Adds an infrastructure for using statsd (configured with
config/statsd.yml) and uses it to track a few basic stats. Stat names
are appended with the hostname.
test plan: without statsd enabled, make sure no errors are raised when
doing requests. add a statsd.yml configuration, restart the server, and
verify that stats are sent over UDP to the given host/port (this could
even be checked without statsd available, by monitoring UDP traffic)
Change-Id: Ie8c3ece7e08ff48616ffd968069bd760300e4fd2
Reviewed-on: https://gerrit.instructure.com/12673
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
fixes#9700
filter sensitive information from the data that is saved for an error report.
also add a few extra fields to the view, such as request_context_id and form
parameters.
test plan:
- make an action with the api that will cause an error report to be generated
- go view that error report
- it should have your access token filtered out
- it should have a request context id field
Change-Id: I3c4d0d8002b6f502fdeb9e4dd40f3fd5d51dc04d
Reviewed-on: https://gerrit.instructure.com/12625
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Adds comments and changes how the custom callback
"on_send_to_external" gets code attached.
Previous callback version is deprecated in future
versions of Rails. This was changed as part of
work on canvas_zendesk_plugin which is
a separate project.
Testing Plan:
---------------------
Nothing to test. No change in behavior.
Tests for "canvas_zendesk_plugin" cover this as well.
Change-Id: I21fd4e20985b4a79b19578611d05e32c3b4b564f
Reviewed-on: https://gerrit.instructure.com/11004
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
postgres can't/won't use the index for a DISTINCT query, so be a
bit more explicit with it to get it to use the index
test plan:
* go to /error_reports
* it should load fast, there should be a categories dropdown,
and it should have a few things in it besides all categories
(assuming you have some error reports)
Change-Id: If7c71cd669e7eadc1792eefe1fb6e85a08c054ed
Reviewed-on: https://gerrit.instructure.com/8190
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This method has the proxy smarts to check x-forwarded-for and client-ip,
and some level of ip spoofing protection.
Change-Id: I19d7768cdbc1d25deceed4a157467d7eb83b4cc8
Reviewed-on: https://gerrit.instructure.com/4516
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
We already have an index on creation date. These are mostly immutable, so I'm
not sure why we would want to purge based on updated date.
Change-Id: Ie52cee3d364dffbf644a73efa9322bf00e3bb362
Reviewed-on: https://gerrit.instructure.com/3942
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
refs #4487
This consolidates our ErrorReport class with our ErrorLogging mechanism,
it's all in ErrorReport now and you call ErrorReport.log_error or
ErrorReport.log_exception to both create an ErrorReport object, and call
the hooks similar to what ErrorLogging did so that plugins for other
error handling mechanisms can be injected.
ErrorReport has a category field now, similar to how ErrorLogging used
to take a type. the /error_reports UI can filter by category.
The plugin interface was designed with Hoptoad integration in mind, but
it should be pretty general.
Change-Id: I59f7a0d44cf4b6215ad13ff92d30e1d1af607b74
Reviewed-on: https://gerrit.instructure.com/3577
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Accounts can specify a destination email address or URL
endpoint that will receive messages as error reports are
created if the feedback button is enabled. This could
be configured before, but it wasn't straightforward
how to go about doing it.
fixes#3410
Change-Id: Ibd28ebf14c876fb216b14d3d56e622fc009aa2ba
Reviewed-on: https://gerrit.instructure.com/2739
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
- added a moderation link on the quiz page
- moderators can see current quiz results for students
- moderators can add time to a current quiz attempt
- moderators can manually unlock a quiz for a student,
which means the student can take the quiz even if
it's locked for everyone else
- moderators can give a student extra time for every
subsequent attempt of a quiz
- moderators can give a student extra attempts on a quiz
- moderators can also update these settings for multiple
students at the same time
Change-Id: I31c34097fc6e19d8c6e377a6059568e591ffbab8
Reviewed-on: https://gerrit.instructure.com/2166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>