Uh oh!
There was an error while loading. Please reload this page.
print the backup codes tab and not the current one - #2704
Conversation
mention-bot
commented
Dec 15, 2016
@ChristophWurst, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nickvergessen to be a potential reviewer. |
karlitschek
commented
Dec 15, 2016
please backport 👍 |
nickvergessen
commented
Dec 15, 2016
Doesn't work here with FF: |
ChristophWurst
commented
Dec 15, 2016
Works here with 50.1.0 🤔 |
Ouch. Doesn't work on Chromium either. |
6bc4b09 to
f86c71bCompareChristophWurst
commented
Dec 19, 2016
For some reason Chrome doesn't allow the "old" approach anymore, it closes the tab immediately if a data url is used. Now I'm using the window object to write to its document. Apparently that works on all browsers I have tested:
I don't have IE nor Safari, we should test those too as I'm not too confident that it works everywhere. Maybe @MorrisJobke or @LukasReschke can help here 😁 |
| var data = this._getDownloadData(); | ||
| var newTab = window.open('', t('twofactor_backupcodes', 'Nextcloud backup codes')); | ||
| newTab.document.write('<h1>' + t('twofactor_backupcodes', 'Nextcloud backup codes') + '</h1>'); | ||
| newTab.document.write(data); |
There was a problem hiding this comment.
cc @LukasReschke for possible security implications of writing to the document directly
… codes Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
8fb43ce to
3295fe2CompareChristophWurst
commented
Jan 17, 2017
rebased |
codecov-io
commented
Jan 17, 2017
Current coverage is 53.92% (diff: 100%)@@ master #2704 diff @@
==========================================
Files 1302 1302 Lines 80097 80097 Methods 7905 7905 Messages 0 0 Branches 1245 1245 ==========================================
Hits 43189 43189 Misses 36908 36908 Partials 0 0
|
MorrisJobke
left a comment
There was a problem hiding this comment.
Tested and works with Firefox, Safari and Chrome 👍
MorrisJobke
commented
Feb 10, 2017
@nickvergessen@rullzer@schiessle@LukasReschke Mind to review this one? |
MorrisJobke
commented
Feb 15, 2017
Ping |
MorrisJobke
commented
Feb 15, 2017
@ChristophWurst Please open a backport PR ;) |
ChristophWurst
commented
Feb 16, 2017
Done: #3510 :-) |
Fixes#2662
Before, the current tab was printed (and closed), not the temporary one with the backup codes.
Should be backported IMO. cc @karlitschek