Alex Dehnert [Sat, 30 Nov 2013 06:45:06 +0000 (01:45 -0500)]
Update Django plugin with current upstream code
* commit '5ba5fe8d4f31b66af67137cc36f79597138b76b0':
Scripts auth: don't activate on 127.0.0.1 either
Use API function instead of UNUSABLE_PASSWORD
Set a password of UNUSABLE_PASSWORD
kinit when creating a MoiraList object
Wrappers for safely calling commands in a new PAG
Validate constitution_url (ASA-#76)
Django MIT plugin: Don't crash on users with hidden emails (ASA Trac: #63)
Function to create an MIT user with LDAP data
* commit 'abab96a3e55d8663f996684add635ff7eaf472f6':
Scripts auth: Use ldap-too for LDAP server
Merge "upstream" fixes from SIPB's snippets
localhost check needs to use portless-HTTP_HOST
Add scripts_login, to do cert login if possible
Shamelessly lift MIT-specific code from Remit
Alex Dehnert [Sun, 7 Jul 2013 04:27:57 +0000 (00:27 -0400)]
Scripts auth: don't activate on 127.0.0.1 either
The scripts auth module has long delegated to the standard Django auth when the
hostname was localhost, in order to ignore local dev server instances. This
makes it also delegate to standard Django for 127.0.0.1 as well. I'm not sure
why this hadn't come up before now... A quick look at the Django codebase
suggests this isn't a recent change.
Alex Dehnert [Sat, 2 Feb 2013 22:50:52 +0000 (17:50 -0500)]
zephyr-post-receive: send the diff when short
When the diff represented by a commit is sufficiently short, send the diff in
addition to the usual commit and change size information. Patch from
/mit/ua/git/zephyr-post-receive, probably originally written by Quentin Smith
<quentin@mit.edu>.
Alex Dehnert [Mon, 24 Dec 2012 08:28:00 +0000 (03:28 -0500)]
Set a password of UNUSABLE_PASSWORD
* Changes ScriptsRemoteUserBackend's configure_user method to set the default
password to UNUSABLE_PASSWORD instead of ScriptsSSLAuth. UNUSABLE_PASSWORD
displays in the admin as "Password: None", instead of an ugly error message.
This should fix "Unknown password hashing algorithm" errors for users
correctly created in the future. (ASA-#132)
* Adds a migration to change current users with passwords of "" or
"ScriptsSSLAuth" to a password of UNUSABLE_PASSWORD ("!"). This will fix
ASA-#132 and the symptoms of ASA-#133 for already-existent users.
Alex Dehnert [Sun, 16 Sep 2012 01:53:40 +0000 (21:53 -0400)]
Wrappers for safely calling commands in a new PAG
The usual mechanism for starting a new PAG is pagsh(1). Unfortunately, because
it basically just execvp(3) /bin/sh passing the appropriate arguments, it isn't
immediately obvious how to safely pass arguments that may contain shell
metacharacters. By using the shell's exec and taking advantage of the fact that
later arguments to /bin/sh end up in $@ we can safely avoid shell
metacharacters. We wrap subprocess.check_{call,output} in
pag_check_{call,output}, which perform appropriate contortions to establish the
PAG before safely executing the passed commands without evaluating any
metacharacters.
Geoffrey Thomas [Tue, 21 Aug 2012 23:11:24 +0000 (16:11 -0700)]
programming: Sync gccrun and disasm from my locker (oops)
disasm gains a -o option to provide arguments to objdump. The argument
to -o gets interpreted by the shell, allowing multiple arguments to be
passed to objdump.
gccrun now passes parameters past the first to gcc, requiring you to
quote the code to be compiled. It also allows the wrapper to be
interpreted by the shell, allowing a wrapper with arguments.
Alex Dehnert [Sun, 18 Dec 2011 05:49:59 +0000 (00:49 -0500)]
Function to create an MIT user with LDAP data
This adds a function get_or_create_mit_user. As with the "get_or_create"
methods on managers, this returns an object satisfying some conditions,
creating it if necessary. In this case, we return a User object that's
populated using data from MIT's LDAP. If the user does not exist and
cannot be found in LDAP, we raise an exception.
Alex Dehnert [Mon, 6 Jun 2011 06:56:19 +0000 (02:56 -0400)]
Add README and COPYING for django/mit/
As mentioned in the README, this is derived from code for the Remit
(https://remit.scripts.mit.edu/trac/) and the ASA DB
(https://asa.scripts.mit.edu/trac/). If you see bug numbers in the history,
they're probably from Remit (https://remit.scripts.mit.edu/trac/query).
Hopefully these can be useful to somebody else.
$() command substitution is a bashism, so use bash instead of sh
in the shebang line.
'readlink -f' isn't available everywhere, and we're not actually
worried about canonicalizing the path so much as avoiding an
uninformative "." as the name of the repo. Just cd into the
directory and look at pwd.
Anders Kaseorg [Tue, 15 Jun 2010 08:11:05 +0000 (04:11 -0400)]
newline-fix.bash: Force the bash prompt to start after a newline
Some commands don’t print a newline at the end of their output, or
take long enough to return that you’ve already typed part of the
next command. Either causes bash to start its prompt in the middle
of a line, which confuses it. This script sets $PROMPT_COMMAND to
echo a magic sequence of terminal commands that will display a red
“<no LF>\n” before the prompt if it would otherwise start in the
middle of a line.
Paul Quimby [Tue, 10 Nov 2009 20:59:43 +0000 (15:59 -0500)]
Added additional scripts for volume control, muting, viewing the queue, and removing music. Updated installation instructions and removed the invididual installation instructions in favor of the install doc.
Anders Kaseorg [Thu, 24 Sep 2009 14:57:00 +0000 (10:57 -0400)]
pkcs2pem: Output a single file with the private key and certificate.
(Actually, it already did, but it also gave you a separate certificate
file.)
It’s more convenient to deal with a single file. Many programs accept
it as the cert file without needing to specify a separate key file.
For other programs, you can just pass the same file as both the cert
file and the key file.