Skip to content
Snippets Groups Projects
Commit 00700662 authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Merge branch 'dev_hotfix_merges' into dev

parents 2255bd5b 03d38c8b
No related branches found
No related tags found
No related merge requests found
......@@ -64,14 +64,18 @@ BrowserID.Provisioning = (function() {
// XXX: certificate duration should vary depending on a variety of factors:
// * user is on a device that is not her own
// * user is in an environment that can't handle the crypto
cert_duration_s: (24 * 60 * 60)
cert_duration_s: (6 * 60 * 60)
};
});
chan.bind('genKeyPair', function(trans, s) {
// this will take a little bit
// XXX: the key length should be controlled by higher level code.
keypair = jwk.KeyPair.generate("DS", 256);
// FIXME: refactor so code that makes this decision is shared.
var keysize = 256;
var ie_version = BrowserID.BrowserSupport.getInternetExplorerVersion();
if (ie_version > -1 && ie_version < 9)
keysize = 128;
keypair = jwk.KeyPair.generate("DS", keysize);
return keypair.publicKey.toSimpleObject();
});
......
......@@ -45,6 +45,7 @@
<script src="/shared/wait-messages.js"></script>
<script src="/shared/error-messages.js"></script>
<script src="/shared/error-display.js"></script>
<script src="/shared/mediator.js"></script>
<script src="/shared/storage.js"></script>
<script src="/shared/xhr.js"></script>
<script src="/shared/network.js"></script>
......
......@@ -79,10 +79,9 @@ echo ''
#produce the main site js
for locale in $locales; do
cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js i18n/${locale}/client.json shared/gettext.js shared/browserid.js lib/dom-jquery.js lib/module.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/class.js shared/mediator.js shared/tooltip.js shared/validation.js shared/helpers.js shared/screens.js shared/browser-support.js shared/wait-messages.js shared/error-messages.js shared/error-display.js shared/storage.js shared/xhr.js shared/network.js shared/provisioning.js shared/user.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js shared/modules/cookie_check.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/$locale/browserid.uncompressed.js
cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js i18n/${locale}/client.json shared/gettext.js shared/browserid.js lib/dom-jquery.js lib/module.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/class.js shared/mediator.js shared/tooltip.js shared/validation.js shared/helpers.js shared/screens.js shared/browser-support.js shared/wait-messages.js shared/error-messages.js shared/error-display.js shared/mediator.js shared/storage.js shared/xhr.js shared/network.js shared/provisioning.js shared/user.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js shared/modules/cookie_check.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/$locale/browserid.uncompressed.js
done
# produce the main site css
cat css/common.css css/style.css css/m.css > $BUILD_PATH/browserid.uncompressed.css
......
......@@ -51,6 +51,15 @@ exampleServer.use(express.static(path.join(__dirname, "..", "example", "primary"
exampleServer.use(express.bodyParser());
const API_PREFIX = '/api/';
exampleServer.use(function(req, resp, next) {
if (req.url.substr(0, API_PREFIX.length) === API_PREFIX) {
resp.setHeader('Cache-Control', 'no-store, max-age=0');
}
next();
});
exampleServer.get("/api/whoami", function (req, res) {
if (req.session && typeof req.session.user === 'string') return res.json(req.session.user);
return res.json(null);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment