Support » Plugin: Flattr » Auto-submit problems

  • I have found and solved 2 bugs in auto-submission. I couldn’t auto-submit posts. After post publish nothing happens. I look into the code:

    flattr5.php, line 446:
    if (($post['post_status'] == "publish") && (get_post_meta($post['ID'], "flattrss_autosubmited", true)=="") && ($call_n == 2) && (get_the_time('U') <= time())) {

    As echo shows get_the_time(‘U’) is always higher on 3 hours then time(). It’s because time() gets GMT, and get_the_time(‘U’) gets time using timezone in WordPress options (in my case UTC +3). So I just replace get_the_time(‘U’) with get_post_time(‘U’, true) which returns time in GMT.

    Second bug:

    flattr5.php, line 536:
    $flattr_user->submitThing($url, encode($title), $category, encode($content), $tags, $language, $hidden);

    The title and description of the thing (with latin and cyrillic symbols) is horrible (something like: %d0%97%d0%b0%d0%b3%d0%be%d0%bb%d0%be%d0%b2%d0%be%d0%ba). So I deleted encode function call and all is OK.

    Can developer comment my bugs submitting?

Viewing 1 replies (of 1 total)
  • Plugin Author Michael Henke


    Thanks for pointing out the UTC problem. There are other implications to the problem as well.

    Your second bug is not a bug per se but a security mechanism that could prevent your blog from injection of malicious code. If your fellow bloggers for example use a ” char in their headline, they would be able to let the php engine execute virtually any code by of their liking. Same is true for different other characters.
    Some entities are decoded on the Flattr API endpoint as well.

Viewing 1 replies (of 1 total)
  • The topic ‘Auto-submit problems’ is closed to new replies.