Viestialustana keskustelupalstat

This was all due to my having botched the migration

21. heinäkuuta 2016 klo 17.27
Sijainti: Keskustelupalstat: Nextcloud
Avainsanat: ownCloud

So I did some more digging and turns out this was all due to my having botched the migration. I had used the experimental upgrader script, which kept failing due to timeouts, so I went ahead and tried to finish it up manually. With everything else apart from the Android app working as expected, I was fooled into thinking I had nailed it. But with this issue persisting, I just had to check, and wouldn’t you know, there were still all these files lingering from the previous Owncloud installation that I hadn’t replaced.

Tl;dr; re-downloaded 9.0.52, replaced the existing installation with the files extracted from the download, and the Android app now also connects without issue.

@HucSte, I’m not sure your issue is related, but if you also migrated from Owncloud, you could try re-installing Nextcloud files afresh.

Vastaa viestiin sen kontekstissa (Nextcloud)

No worries, thanks for taking a look at this!

20. heinäkuuta 2016 klo 21.42
Sijainti: Keskustelupalstat: Nextcloud

No worries, thanks for taking a look at this @tobiasKaminsky!

Vastaa viestiin sen kontekstissa (Nextcloud)

My installation is served over https too

20. heinäkuuta 2016 klo 20.36
Sijainti: Keskustelupalstat: Nextcloud
Avainsanat: Apache

Forgot to mention that my installation is served over https too, on Apache. But for me there are no SSL errors to be seen either.

Vastaa viestiin sen kontekstissa (Nextcloud)

Can’t connect Nextcloud Android app with the server

20. heinäkuuta 2016 klo 19.20
Sijainti: Keskustelupalstat: Nextcloud
Avainsanat: Android, F-Droid, Nexus, Samsung

I just migrated from Owncloud 8.2 to Nextcloud 9.0.52. Everything else (i.e. the web interface, desktop client) seems to work just fine, but I can’t get the Nextcloud Android app to connect with the server. I can enter the URL (no errors), my login and password, but the ”Connect” button feels totally unresponsive, it does nothing at all no matter how much I tap it. No error messages are given by the app nor is there anything correlating with the attempts in server logs.

This happens on both my phone (Nexus 5X, Android M) and tablet (Samsung Tab 4, Android L). I also tried the Beta app from F-Droid and the issue is present there too. It’s also present in both my WLAN and when using a direct 3G connection on the phone (so I don’t think the WLAN router’s firewall is the cause either).

The Owncloud app on the same devices still works with the server, although I haven’t tried logging out and re-connecting it.

The server is on shared hosting where I have shell access.

Any suggestions?

Vastaa viestiin sen kontekstissa (Nextcloud)

All right, I’ll have to stick with the shortcode approach

26. tammikuuta 2016 klo 9.21
Sijainti: Keskustelupalstat: WordPress Codex
Avainsanat: WordPress

All right, thanks for the response. As I said, the shortcode approach works just fine so I’ll have to stick with that, and create my own custom post type if/when necessary.

Vastaa viestiin sen kontekstissa (WordPress Codex)

Only shortcode, no gallery posts?

24. tammikuuta 2016 klo 16.56
Sijainti: Keskustelupalstat: WordPress Codex
Avainsanat: WordPress

The description page clearly says the plugin features a ”Gallery custom post type”, but for the life of me I cannot figure out how to publish or even preview those posts. I can add galleries and use the short link on other post types, but the editor for galleries has no ”preview” functionality and there’s no way to view gallery posts on the front end on their own. I’d expect to be able to view the galleries at /(gallery_post_type_slug)/(gallery_post_slug).

Looking at the custom post type code (includes/class-posttypes.php), the ’public’ and ’rewrite’ args to register_post_type() have been set to false, which according to Codex documentation causes what I’m seeing. The args variable has a filter so I could override it; does this imply that I’m intended to add a filter to have the galleries work as a viewable post type and not just something used behind the scenes by the plugin?

Vastaa viestiin sen kontekstissa (WordPress Codex)

My first quick implementation of the ”full page as key” idea

4. lokakuuta 2015 klo 10.46
Sijainti: Keskustelupalstat: Library of Babel

Here’s my first quick implementation of the ”full page as key” idea:

Save page as key:

(function () {
    localStorage.setItem('libraryOfBabelKey', document.getElementById('textblock').textContent);
}());

Decrypt using previously saved key:

(function () {
    var alphabet, c, i, m, text, key;

    alphabet = 'abcdefghijklmnopqrstuvwxyz,. ';
    key = localStorage.getItem('libraryOfBabelKey');
    if (!key) {
        alert('No key has been saved.');
        return;
    }
    text = {
        original: document.getElementById('textblock').textContent,
        decoded: ''
    };

    for (i = 0; i < text.original.length; i += 1) {
        c = text.original.substr(i, 1);
        if (c === '\n') {
            text.decoded += c;
        } else {
            m = alphabet.indexOf(key.substr(i, 1));
            text.decoded += alphabet.substr(((alphabet.indexOf(c) - m) % alphabet.length), 1);
        }
    }
    document.getElementById('textblock').textContent = text.decoded;
}());

Vastaa viestiin sen kontekstissa (Library of Babel)

Already noticed the first mistake

4. lokakuuta 2015 klo 9.03
Sijainti: Keskustelupalstat: Library of Babel

You’re right Jonathan, using one whole page to decipher another would also be interesting. It’d take a bit more code (temporary storage is needed for keeping the previous page) but it still shouldn’t be too difficult. The pages could then be considered as having been encrypted with a one-time pad, which is unbreakable and thus a cool idea in itself.

I already noticed the first mistake in my code above: I forgot to strip the page number from the title prior to use, but it should be, as numbers aren’t part of the alphabet. Here’s a fixed version that takes out the page number and whitespace preceding it:

(function () {
    var alphabet, c, i, m, text, title;

    alphabet = 'abcdefghijklmnopqrstuvwxyz,. ';
    title = document.title.replace(new RegExp('[^abcdefghijklmnopqrstuvwxyz,\. ]', 'g'), '');
    title = title.substr(0, title.length - 1);
    text = {
        original: document.getElementById('textblock').textContent,
        decoded: ''
    };

    for (i = 0; i < text.original.length; i += 1) {
        c = text.original.substr(i, 1);
        if (c === '\n') {
            text.decoded += c;
        } else {
            m = alphabet.indexOf(title.substr(i % title.length, 1)); /* add "+ 1" if you want A = 1, B = 2,... instead of A = 0, B = 1,... */
            text.decoded += alphabet.substr(((alphabet.indexOf(c) - m) % alphabet.length), 1);
        }
    }
    document.getElementById('textblock').textContent = text.decoded;
}());

Vastaa viestiin sen kontekstissa (Library of Babel)

Vigenère cipher

3. lokakuuta 2015 klo 15.09
Sijainti: Keskustelupalstat: Library of Babel

Here’s a piece of JavaScript I made that uses the book title as a Vigenère cipher keyword to decrypt the page content. You can paste it directly into the browser’s URL bar on a library page to decrypt. (I made it in a hurry so it comes with no warranty!)

javascript:(function () {
    var alphabet, c, i, m, text, title;

    alphabet = 'abcdefghijklmnopqrstuvwxyz,. ';
    title = document.title;
    text = {
        original: document.getElementById('textblock').textContent,
        decoded: ''
    };

    for (i = 0; i < text.original.length; i += 1) {
        c = text.original.substr(i, 1);
        if (c === '\n') {
            text.decoded += c;
        } else {
            m = alphabet.indexOf(title.substr(i % title.length, 1)); /* add "+ 1" if you want A = 1, B = 2,... instead of A = 0, B = 1,... */
            text.decoded += alphabet.substr(((alphabet.indexOf(c) - m) % alphabet.length), 1);
        }
    }
    document.getElementById('textblock').textContent = text.decoded;
}());

Vastaa viestiin sen kontekstissa (Library of Babel)

You could argue the code already is open

26. syyskuuta 2015 klo 18.53
Sijainti: Keskustelupalstat: Library of Babel

You could argue the code already is open. After all, you can just go to the library and get it, provided you know where to look. ;-)

Vastaa viestiin sen kontekstissa (Library of Babel)

« Uudempia - Vanhempia »