Commit 76eea6a7 authored by Vincent Petry's avatar Vincent Petry Committed by GitHub

Merge pull request #27460 from owncloud/redirect-from-old-desktop-apps

redirect to new location for app passwords
parents 2b35d274 e3ad9576
......@@ -64,12 +64,18 @@ jQuery.fn.enter = function (callback, allowEmptyValue) {
$(document).ready(function () {
// 'redirect' to anchor sections
// anchors are lost on redirects (e.g. while solving the 2fa challenge) otherwise
// example: /settings/person?section=devices will result in /settings/person?#devices
// example: /settings/personal?section=devices will result in /settings/personal?#devices
if (!window.location.hash) {
var query = OC.parseQueryString(location.search);
if (query && query.section) {
OC.Util.History.replaceState({});
window.location.hash = query.section;
}
} else {
if(window.location.hash === '#apppasswords' && window.location.pathname === '/settings/personal') {
// Handle old apppasswords links from desktop apps
OC.redirect(OC.generateUrl('/settings/personal?sectionid=security#apppasswords'));
}
}
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment