Git Product home page Git Product logo

pixmicat's Introduction

Pixmicat! Imageboard System No Maintenance Intended Build Status

What is this?

It's a bulletin board system which is aimed to share image files and make a comment on these images. Registration is not needed to create a new topic, reply, or download image files. Forked from futaba.php that a Japanese website 2chan (Futaba channel) released.

License

Artistic License 2.0

Requirements

  • PHP 5.3.0 or above (PHP 4 is not supported)
  • GD module

Resources

pixmicat's People

Contributors

ccpz avatar irfan-ansari-au28 avatar kennyl avatar lenkimo avatar scribetw avatar touhonoob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pixmicat's Issues

Apply for JetBrains' PhpStorm Open Source License

https://www.jetbrains.com/phpstorm/

我在工作上開發 Java,已經習慣使用 IntelliJ IDEA (雖然公司沒有買 Ultimate,只能用 Community)。

十年前剛開發 futaba.php 修改時,我是使用 EmEditor。
後來研究過一些 IDE 輔助開發,eclipse, Aptana studio, NetBeans, PhpStorm...感覺還是 PhpStorm 最強大。
但是限於付費最後選擇免費的 NetBeans。

現在 JetBrains 有提供自由軟體開發者的免費授權申請,我就試著申請了。

getRemoteAddrThroughProxy() 使用 $PROXYHEADERlist 時 scope 不正確

相關討論

http://2cat.or.tl/~scribe/pixmicat_dev/pixmicat.php?res=3381

問題描述

errorlog 在發文回文會出現以下錯誤

2014-08-17T21:01:59+08:00 ERROR Global - Error caught: #2: Invalid argument supplied for foreach() in /home/*******/public_html/testing/lib/lib_common.php on line 344
2014-08-17T21:01:59+08:00 ERROR Global - Error caught: #2: Invalid argument supplied for foreach() in /home/**
*****/public_html/testing/lib/lib_common.php on line 344

重現步驟

  1. 版面發文/回文
  2. 檢查error log

問題分析

$PROXYHEADERlist 在當下為 null,非一般預期。
因為 $PROXYHEADERlist 是在 config 所定義,因此要使用必須使用 global 引入。
不然會因為值域不對而無法得到預期的結果。

導入 Composer 套件管理

是該時候擁抱自由社群提供的第三方函式庫了。
就算還沒有要用,未來也可以比較順利銜接。

autoHookAdminList 問題。

前台管理如果module 有兩個以上只會顯示一個。

如有「刪推」就没有「E」(改文)的link

public function autoHookAdminList(&$modFunc, $post, $isres) {
    $modFunc.= '[<a href="'.$this->getModulePageURL(
            array(
                'action' => 'del',
                'no' => $post[no]
            )
        ).'">刪推</a>]';
}

是否可以有取代 DNSBL 的新封鎖方法?

另外有鑑於日前使用的 DNSBL 都是海外端,常常有誤鎖用戶的地圖砲發生,尤其是台灣對 CloudFlare 有瓶頸問題,所以我都會掛私人的日本 VPN 連回來,因為開圖很快,結果常常被歸類在 DNSBL 或是 IP/Hostname 地圖砲裡面,之前在使用 DNSBL 時也常常有用戶抱怨說被鎖在地圖砲裡面,我也只能消極的建議他們重開 ADSL 換個新浮動 IP

在未來的 Pixmicat 可不可以改用一個類似 DNSBL 的回報機制?回報法是這樣
「版面管理員通報 > 伺服器增加進清單並自動封鎖三天 」,而資料提取是
「發文時版面查詢伺服器 > 伺服器查詢 > 伺服器回傳結果」,而預設封鎖該位址三天,在對付使用浮動亂版的小白同時也可以盡量避免正常使用者的困擾

我願意提供一台日本的 VPS 來架設這樣的服務,規格是 1GB 記憶體,與 50GB 容量的固態硬碟,傳輸流量方面無限制,上下行速度 100Mbps,預設提供 IPv4 與 IPv6 位址,為了節省成本就不申請域名了,一年 10800 JPY 約台幣 2707,我願意無償提供,畢竟我也是在使用 Pixmicat 架設版面,但可以贊助

8th.Release.2 未能自動init sqlite3資料庫

在我架設的時候,我必需在pixmicat.php加入以下程式碼

53d52
<     $PIO->dbInit();

否貼會出現以下錯誤(Xdebug)

( ! ) Fatal error: Call to a member function fetchAll() on boolean in /home/xxxx/sites/xxx.xxx/www/board/lib/pio/pio.sqlite3.php on line 235
Call Stack
#   Time    Memory  Function    Location
1   0.0124  243512  {main}( )   ../pixmicat.php:0
2   0.0399  402848  updatelog( )    ../pixmicat.php:1279
3   0.0440  470328  fetchThreadList ( ) ../pixmicat.php:84
4   0.0440  470584  LoggerInjector->__call( )   ../pixmicat.php:84
5   0.0440  471088  LoggerInterceptor->invoke( )    ../lib_loggerinterceptor.php:76
6   0.0440  471296  call_user_func_array:{//home/xxxx/sites/xxx.xxx/www/board/lib/lib_loggerinterceptor.php:31} ( ) ../lib_loggerinterceptor.php:31
7   0.0440  471584  PIOsqlite3->fetchThreadList( )  ../lib_loggerinterceptor.php:31

環境: archlinux + nginx 1.6.2 + php 5.6.2 + php-sqlite 5.6.2

遵從 PHP-FIG PSR 標準

PHP-FIG 發布了一系列 PSR 標準,應該在 PHP 界被奉為圭臬。
有一套標準可以遵從是好事。

FriendsOfPHP/PHP-CS-Fixer 有提供監察工具可以協助遵從。

[PIO log] 路徑組合錯誤

<?php
define("ROOTPATH", dirname(__FILE__).DIRECTORY_SEPARATOR); // 主程式根目錄
define("STORAGE_PATH", ROOTPATH); // 圖檔、快取儲存目錄 (需具有讀寫權限 777)
define("CONNECTION_STRING", 'log://'.STORAGE_PATH.'img.log:'.STORAGE_PATH.'tree.log/'); // PIO 連線字串 (Log)

$PIOEnv = array( // PIO 環境常數
    'BOARD' => ROOTPATH,
);

$this->logfile = $this->ENV['BOARD'].$linkinfos[1]; // 投稿文字記錄檔檔名
$this->treefile = $this->ENV['BOARD'].$linkinfos[2]; // 樹狀結構記錄檔檔名
$this->porderfile = $this->ENV['BOARD'].$this->ENV['LUTCACHE']; // LUT索引查找表暫存檔案

$this->ENV['BOARD'] = ROOTPATH = /wwwroot/
$linkinfos[1] = STORAGE_PATH.'img.log = /wwwroot/img.log
$this->logfile = /wwwroot//wwwroot/img.log

支援 PHP 5.5

摘要

抓出 PHP 5.5 不相容的寫法修正,同時兼顧最低版本 PHP 5.2 的相容度。

驗證步驟

  • 使用 PHP 5.5.9, PHP 5.2.0 運作 pixmicat.php
  • 初始化 (PIO 使用 PDO SQLite, FileIO 使用 normal)
  • 發文貼圖
  • 回文貼圖
  • 自刪
    • 只刪圖
    • 圖文都砍
  • 管理刪
    • 只刪圖
    • 圖文都砍
  • 搜尋文章
  • 系統資訊
  • 登入管理
    • 刪除文章
    • 停止討論串
  • 前端管理

修正 SQL Injection 漏洞

感謝 @RicterZ (404 Team@Knownsec) 為程式做 Code Review 並進行滲透測試。
此題目主要修正發現到的漏洞,並會盡速推出 8th.Release.3 作為修補。

password

what should be put as the default password to log into admin account? Sorry, I can't read Chinese.

支援 WebM

先研究是否能接受上傳WebM並嵌入作為動畫。

未來再考慮GIF轉WebM。

去除明文密碼儲存

摘要

太危險了。

擬修改使用 hash + salt 儲存,在初始化時需要指定 salt 及計算密碼 hash,並填入 config 以完成設定。

驗證步驟

  • 初始化時,指定 salt 及密碼計算 hash
  • 更新到 config.php
  • 後台輸入管理密碼登入
  • 前台輸入管理密碼刪文

當類別標籤搜尋為空時,仍顯示頁面與重新快取連結

可能因為快取緣故,原本已經找過,數目為0的類別標籤,
會因為後來才增加但未更新快取,造成無法有重新快取檢視最新情況的機會。

EX:

  1. 先搜尋 AAA 類別標籤,但該標籤無文章 (快取 AAA = 0),顯示找不到錯誤訊息
  2. 新增文章,類別標籤加上 AAA
  3. 搜尋 AAA 類別標籤,因為已有快取故跳過搜尋,顯示找不到錯誤訊息,且沒有重新快取連結可讓使用者重新搜尋

改成若該標籤無文章,還是顯示頁面與重新快取連結,
這樣在遇到3.的情況時,就可以重新快取看到最新的現況。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.