GithubHelp home page GithubHelp logo

xoopscube / legacy Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 30.0 39.87 MB

📦 XOOPSCube - Web Application Platform - Simple, Secure, Scalable

Home Page: https://xoopscube.github.io/legacy/

License: BSD 3-Clause "New" or "Revised" License

CSS 2.98% HTML 11.92% PHP 73.22% Smarty 0.20% JavaScript 11.59% Hack 0.01% Less 0.09%
cms content-management-system dashboard gui-application installer module mysql package php self-hosted theme updater web-application webapp wizard wizard-interface

legacy's People

Contributors

argon358 avatar bluemooninc avatar gigamaster avatar kilica avatar kujiy avatar maruta-bis5 avatar naao avatar nao-pon avatar nbuy avatar nobunobuta avatar nouphet avatar nunoluciano avatar onuma0519 avatar ryujiamano avatar shirosaki avatar sohgo avatar suin 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

Watchers

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

legacy's Issues

コーディング規約

いつも素敵なプロジェクトをありがとうございます。

普段私はphp-cs-fixer で自動整形しているのですが、xoopsのファイルは必ず自動整形されてしまいxupdateの度にぶつかるので困っています。
(急いで書いたコードでコアハックしているものもあるため)

PSR2など、xoopsには何らかのcoding standardがあるのでしょうか。
ゆるゆるのrulesetでもいいので、何かしら基準を教えていただけますと助かります。
できればfixerはphp-cs-fixerで、rulesetはこれです、といったところまで教えていただきたいです。

よろしくお願い致します。

passwordNeedsRehash はパスワード変更を強制しますか?

パスワード強化 #117 のご対応をいただきありがとうございます。xoopsコミュニティのすごさに圧倒されております 😺

さて、ソースを眺めていて少し教えていただきたいことがありました。

passwordNeedsRehash が発動したときの動きが edituser.php へ遷移させパスワード変更を促すように見えます。(コードから想像で話しています)

https://github.com/xoopscube/legacy/pull/126/files#diff-39ce912f7a253bb0bc8a0d3308e1c574R294

とても素敵な動きだと思いました!
と同時に、ログイン時に入力されたpwを使ってrehashすれば、ユーザの入力負担が減るのでさらに嬉しいのでは?と思いつきました。

うちの使い方が特殊なんですが、ユーザにpw変更をさせない(ひどい)運用をしておりまして、edituser.php自体を隠しているxoopsが多数あります。知っているところでもpwをexcel管理しているところもあるので、地味に影響大きいのではと思ったりしまして(運用が悪いのはわかっているのですが、なりすまし機能がない限り管理者はユーザのpwを知っていないとサポートできないのです)

まあそれは置いておいて、使うユーザとしては "裏でこっそりrehash" の方が嬉しいかな~と思ったりしたのですが、そういう選択肢はありでしょうか? @nao-pon

Notice: Array to string conversion in kernel/module.php on line 177

互換モジュールのモジュール管理画面にて、表題のエラーが出る。

原因は、X-update の adminmenu が Array であることだが、モジュール管理画面のモジュール一覧レンダリング時には、adminmenu を取得する必要がない(AdminSideMenu.class.phpで処理)ので 、ModuleListAction.class.php では取得しないようにする。

Cool URI expand

https://www.facebook.com/groups/176626012402337/314526028612334/

xclFinder を Cool URI に対応させようとテストしてるのですが、XOOPS_URL が ディレクトリを掘ってる場合、(/hoge/ が XOOPS Root) の場合に RewriteBase /hoge/ としないと動かなような感じです。(少なくとも私の環境 (Apache/2.2.21 (Unix))では)

あと、xelFinder では、実際には PHP では参照していないのですが、ブラウザへのファイル名通知として URL の最後にファイル名を入れています。
これが原因で管理画面に表示される rewrite ルールではマッチしてくれませんでした。

RewriteRule ^(\w+)/(\w+)/(\d+)/ /xoops_root_path/modules/$1/index.php?requested_data_name=$2&requested_data_id=$3 [L,QSA]

を追加することで対応できました。汎用性を持たせて

RewriteRule ^(\w+)/(\w+)/(\d+)/(.+)$ /xoops_root_path/modules/$1/index.php?requested_data_name=$2&requested_action_name=$4&requested_data_id=$3 [L,QSA]

でもいいのですが、これって管理画面に表示される rewrite ルールに追加することは可能でしょうか?

Tar Download Bug

Unnecessary \ was exists.
So I want to delete unnecessary \ .

zipdownloader.php error

See
http://xoopscube.jp/forum/7050

[ja]
XCL2.2.1のzipdownloader.phpでエラーが発生します。

html/class/zipdownloader.phpの82、83行目

header('Content-Type: application/zip') ;
header('Content-Length: '.floatval(@strlen($file))) ;

の""が付いているため、PHPがエラーとなります。

header('Content-Type: application/zip') ;
header('Content-Length: '.floatval(@strlen($file))) ;

にするとエラーは消えます。
[/ja]

Installer

The installation process consists of unzipping archive and the follow step-by-step instructions of "install"

The installer wizard is the first step made by a user, and it's a "love or hate at first sight"

Review Installer UX design, re-order steps
php.function.chmod, attempt to create database, drop tables on failed install, fix previous and next steps.

  1. Check client device, browser language
    (Instantly switch content languages client-side)

Terms of use/License

  • checkbox

Introduction to installer steps

  • Select Installation language
  1. Server Environment

PHP Extensions required
MySQL Database version
Check XC package integrity
Files and Folders Permissions

  • Notification / Validation

(if troubles, suggest use of FTP software)
(if Xoops_trust_path not found, notify next step!)

  1. Data MySQL

Server, dbname, username ...path, trust_path

  • validation and submit
  1. Legacy
  • Site name
  • Theme Selection
  • Timezone
  • Admin Account
  1. Login

Notify and select option

  • delete or rename folder "Install"
  • chmod mainfile
  • install modules

refactoring for user module

fetch function on the XOOPS_URL/module/user/admin/forms/UserFilterForm.class.php

This line get the request but no longer to use this parameter.

    $uid = $root->mContext->mRequest->getRequest('uid');

or It should be chage xoops_getrequest('uid') to $uid;

regards,

Yoshi :-)

function fetch()
{
    parent::fetch();

    $root =& XCube_Root::getSingleton();
    $uid = $root->mContext->mRequest->getRequest('uid');
    $email = $root->mContext->mRequest->getRequest('email');
    $attachsig = $root->mContext->mRequest->getRequest('attachsig');
    $rank = $root->mContext->mRequest->getRequest('rank');
    $level = $root->mContext->mRequest->getRequest('level');
    $timezone_offset = $root->mContext->mRequest->getRequest('timezone_offset');
    $user_mailok = $root->mContext->mRequest->getRequest('user_mailok');
    $option_field = $root->mContext->mRequest->getRequest('option_field');
    $search = $root->mContext->mRequest->getRequest('search');

    if (isset($_REQUEST['uid'])) {
        $this->mNavi->addExtra('uid', xoops_getrequest('uid'));
        $this->_mCriteria->add(new Criteria('uid', xoops_getrequest('uid')));
    }

Workflow Bugs

Workflow status handling in Legacy_AbstractClientObjectHandler is wrong.
So workflow status is reverted to "progress" when an object is updated, even if the update is about status to "finished".

Make Install Check user-friendly

Because end-users get stuck with a simple Legacy notification on the screen.
After the last step of the Web Installation Wizard,
we need simple options to move forward.

Timezone ID '-5' is invalid

Trying to install the latest version on PHP 5.5.9:.

Notice: date_default_timezone_set(): Timezone ID '-5' is invalid in S:\wamp64\www\xcube22b\install\include\makedata.php on line 67
Call Stack

Time Memory Function Location

1 0.0010 331032 {main}( ) ..\index.php:0
2 0.0080 551968 include( 'S:\wamp64\www\xcube22b\install\custom\install_insertData_theme.inc.php' ) ..\index.php:102
3 0.0120 580320 require_once( 'S:\wamp64\www\xcube22b\install\wizards\install_insertData.inc.php' ) ..\install_insertData_theme.inc.php:3
4 0.0630 3233304 make_data( $dbm = class db_manager { public $s_tables = array ('insert' => array ('c671b2_bannerclient' => 1, 'c671b2_configcategory' => 4, 'c671b2_configoption' => 13, 'c671b2_imgset' => 1, 'c671b2_imgset_tplset_link' => 1, 'c671b2_ranks' => 7, 'c671b2_smiles' => 17, 'c671b2_groups' => 3, 'c671b2_banner' => 1, 'c671b2_tplset' => 1, 'c671b2_config' => 4)); public $f_tables = array (); public $db = class XoopsMySQLDatabaseSafe { public $conn = resource(62) of type (mysql link); public $mPrepareQuery = NULL; public $prefix = 'c671b2'; public $logger = class XoopsLogger { public $queries = array (0 => array ('sql' => 'INSERT INTO c671b2_bannerclient VALUES (0, 'Sample client', 'XOOPS Cube Project Team', '', '', '', '')', 'error' => NULL, 'errno' => NULL), 1 => array ('sql' => 'INSERT INTO c671b2_configcategory VALUES (1, '_MD_AM_GENERAL', 0)', 'error' => NULL, 'errno' => NULL), 2 => array ('sql' => 'INSERT INTO c671b2_configcategory VALUES (4, '_MD_AM_CENSOR', 0)', 'error' => NULL, 'errno' => NULL), 3 => array ('sql' => 'INSERT INTO c671b2_configcategory VALUES (5, '_MD_AM_SEARCH', 0)', 'error' => NULL, 'errno' => NULL), 4 => array ('sql' => 'INSERT INTO c671b2_configcategory VALUES (6, '_MD_AM_MAILER', 0)', 'error' => NULL, 'errno' => NULL), 5 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (1, '_MD_AM_DEBUGMODE1', '1', 13)', 'error' => NULL, 'errno' => NULL), 6 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (2, '_MD_AM_DEBUGMODE2', '2', 13)', 'error' => NULL, 'errno' => NULL), 7 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (3, '_NESTED', 'nest', 32)', 'error' => NULL, 'errno' => NULL), 8 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (4, '_FLAT', 'flat', 32)', 'error' => NULL, 'errno' => NULL), 9 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (5, '_THREADED', 'thread', 32)', 'error' => NULL, 'errno' => NULL), 10 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (6, '_OLDESTFIRST', '0', 33)', 'error' => NULL, 'errno' => NULL), 11 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (7, '_NEWESTFIRST', '1', 33)', 'error' => NULL, 'errno' => NULL), 12 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (14, '_MD_AM_DEBUGMODE3', '3', 13)', 'error' => NULL, 'errno' => NULL), 13 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (23, '_MD_AM_DEBUGMODE0', '0', 13)', 'error' => NULL, 'errno' => NULL), 14 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (24,'PHP mail()','mail',64)', 'error' => NULL, 'errno' => NULL), 15 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (25,'sendmail','sendmail',64)', 'error' => NULL, 'errno' => NULL), 16 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (26,'SMTP','smtp',64)', 'error' => NULL, 'errno' => NULL), 17 => array ('sql' => 'INSERT INTO c671b2_configoption VALUES (27,'SMTPAuth','smtpauth',64)', 'error' => NULL, 'errno' => NULL), 18 => array ('sql' => 'INSERT INTO c671b2_imgset VALUES (1, 'default', 0)', 'error' => NULL, 'errno' => NULL), 19 => array ('sql' => 'INSERT INTO c671b2_imgset_tplset_link VALUES (1, 'default')', 'error' => NULL, 'errno' => NULL), 20 => array ('sql' => 'INSERT INTO c671b2_ranks VALUES (1, 'Just popping in', 0, 20, 0, 'rank3e632f95e81ca.gif')', 'error' => NULL, 'errno' => NULL), 21 => array ('sql' => 'INSERT INTO c671b2_ranks VALUES (2, 'Not too shy to talk', 21, 40, 0, 'rank3dbf8e94a6f72.gif')', 'error' => NULL, 'errno' => NULL), 22 => array ('sql' => 'INSERT INTO c671b2_ranks VALUES (3, 'Quite a regular', 41, 70, 0, 'rank3dbf8e9e7d88d.gif')', 'error' => NULL, 'errno' => NULL), 23 => array ('sql' => 'INSERT INTO c671b2_ranks VALUES (4, 'Just can\'t stay away', 71, 150, 0, 'rank3dbf8ea81e642.gif')', 'error' => NULL, 'errno' => NULL), 24 => array ('sql' => 'INSERT INTO c671b2_ranks VALUES (5, 'Home away from home', 151, 10000, 0, 'rank3dbf8eb1a72e7.gif')', 'error' => NULL, 'errno' => NULL), 25 => array ('sql' => 'INSERT INTO c671b2_ranks VALUES (6, 'Moderator', 0, 0, 1, 'rank3dbf8edf15093.gif')', 'error' => NULL, 'errno' => NULL), 26 => array ('sql' => 'INSERT INTO c671b2_ranks VALUES (7, 'Webmaster', 0, 0, 1, 'rank3dbf8ee8681cd.gif')', 'error' => NULL, 'errno' => NULL), 27 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (1, ':-D', 'smil3dbd4d4e4c4f2.gif', 'Very Happy', 1)', 'error' => NULL, 'errno' => NULL), 28 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (2, ':-)', 'smil3dbd4d6422f04.gif', 'Smile', 1)', 'error' => NULL, 'errno' => NULL), 29 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (3, ':-(', 'smil3dbd4d75edb5e.gif', 'Sad', 1)', 'error' => NULL, 'errno' => NULL), 30 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (4, ':-o', 'smil3dbd4d8676346.gif', 'Surprised', 1)', 'error' => NULL, 'errno' => NULL), 31 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (5, ':-?', 'smil3dbd4d99c6eaa.gif', 'Confused', 1)', 'error' => NULL, 'errno' => NULL), 32 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (6, '8-)', 'smil3dbd4daabd491.gif', 'Cool', 1)', 'error' => NULL, 'errno' => NULL), 33 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (7, ':lol:', 'smil3dbd4dbc14f3f.gif', 'Laughing', 1)', 'error' => NULL, 'errno' => NULL), 34 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (8, ':-x', 'smil3dbd4dcd7b9f4.gif', 'Mad', 1)', 'error' => NULL, 'errno' => NULL), 35 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (9, ':-P', 'smil3dbd4ddd6835f.gif', 'Razz', 1)', 'error' => NULL, 'errno' => NULL), 36 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (10, ':oops:', 'smil3dbd4df1944ee.gif', 'Embaressed', 0)', 'error' => NULL, 'errno' => NULL), 37 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (11, ':cry:', 'smil3dbd4e02c5440.gif', 'Crying (very sad)', 0)', 'error' => NULL, 'errno' => NULL), 38 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (12, ':evil:', 'smil3dbd4e1748cc9.gif', 'Evil or Very Mad', 0)', 'error' => NULL, 'errno' => NULL), 39 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (13, ':roll:', 'smil3dbd4e29bbcc7.gif', 'Rolling Eyes', 0)', 'error' => NULL, 'errno' => NULL), 40 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (14, ';-)', 'smil3dbd4e398ff7b.gif', 'Wink', 0)', 'error' => NULL, 'errno' => NULL), 41 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (15, ':pint:', 'smil3dbd4e4c2e742.gif', 'Another pint of beer', 0)', 'error' => NULL, 'errno' => NULL), 42 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (16, ':hammer:', 'smil3dbd4e5e7563a.gif', 'ToolTimes at work', 0)', 'error' => NULL, 'errno' => NULL), 43 => array ('sql' => 'INSERT INTO c671b2_smiles VALUES (17, ':idea:', 'smil3dbd4e7853679.gif', 'I have an idea', 0)', 'error' => NULL, 'errno' => NULL), 44 => array ('sql' => 'INSERT INTO c671b2_groups VALUES (0, 'Webmasters', 'Webmasters of this site', 'Admin')', 'error' => NULL, 'errno' => NULL), 45 => array ('sql' => 'INSERT INTO c671b2_groups VALUES (0, 'Registered Users', 'Registered Users Group', 'User')', 'error' => NULL, 'errno' => NULL), 46 => array ('sql' => 'INSERT INTO c671b2_groups VALUES (0, 'Anonymous Users', 'Anonymous Users Group', 'Anonymous')', 'error' => NULL, 'errno' => NULL), 47 => array ('sql' => 'INSERT INTO c671b2_banner (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (1, 1, 0, 1, 0, 'http://localhost/xcube22b/images/banners/banner.png\', 'http://xoopscube.org/\', 1008813250, '')', 'error' => NULL, 'errno' => NULL), 48 => array ('sql' => 'INSERT INTO c671b2_tplset VALUES (1, 'default', 'XOOPS Cube Default Template Set', '', 1392476387)', 'error' => NULL, 'errno' => NULL), 49 => array ('sql' => 'INSERT INTO c671b2_config VALUES (1, 0, 1, 'sitename', '_MD_AM_SITENAME', 'XOOPS Cube Site', '_MD_AM_SITENAMEDSC', 'textbox', 'text', 0)', 'error' => NULL, 'errno' => NULL), 50 => array ('sql' => 'INSERT INTO c671b2_config VALUES (2, 0, 1, 'slogan', '_MD_AM_SLOGAN', 'Just Use it!', '_MD_AM_SLOGANDSC', 'textbox', 'text', 2)', 'error' => NULL, 'errno' => NULL), 51 => array ('sql' => 'INSERT INTO c671b2_config VALUES (3, 0, 1, 'language', '_MD_AM_LANGUAGE', 'english', '_MD_AM_LANGUAGEDSC', 'language', 'other', 4)', 'error' => NULL, 'errno' => NULL), 52 => array ('sql' => 'INSERT INTO c671b2_config VALUES (4, 0, 1, 'startpage', '_MD_AM_STARTPAGE', '--', '_MD_AM_STARTPAGEDSC', 'startpage', 'other', 6)', 'error' => NULL, 'errno' => NULL)); public $blocks = array (); public $extra = array (); public $logstart = array (); public $logend = array () } } }, $cm = class cache_manager { public $s_files = array (); public $f_files = array () }, $adminname = 'admin', $adminpass = 'z2anette', $adminmail = '[email protected]', $language = 'english', $gruops = array ('XOOPS_GROUP_ADMIN' => 1, 'XOOPS_GROUP_USERS' => 2, 'XOOPS_GROUP_ANONYMOUS' => 3), $timezone = '-5' ) ..\install_insertData.inc.php:52
5 0.0670 3239176 date_default_timezone_set ( '-5' ) ..\makedata.php:67

ユーザのパスワードがsaltなしのMD5で保存されている

この問題はxoopsxを企業が利用できない大きな理由になっていると思います。

最低でもsha1にしたいのですが、既存システムを移行させるのは面倒なので(パスワード変更依頼画面などを用意しないといけない)、新規システムだけでもそうすることができないでしょうか。

するとすれば、どのような作りにするべきでしょうか。

過去のトライやプラクティスがあれば教えていただきたいです。

Better to change the name of "ユーザーグループ管理" to "グループ管理"

ユーザーモジュールのグループを管理するところが「ユーザーグループ管理」になっているけど「グループ管理」を探しにくい(というかグループを管理できることを知らない人が多い)ので、

「ユーザーグループ管理」を「グループ管理」に変更することを提案します。

なお、英語版は最初から Group Management になってます。

wysiwyg editor

Release with a wysiwyg editor installed by default !

There's no sense releasing a package with several editors and none can be installed by end-user without coding!

PHPMailer < 5.2.20 has Remote Code Execution

XCL の最新コードで確認した限り、xoopsmultimailer クラスと Legacy_Mailer クラスにおいては Sender は固定されているので、そのクラスを使用しているのであれば問題はなさそうです。

しかし、私は専門家ではありませんので「問題なさそうだ」としか言えません。

早急に同梱している PHPMailer を最新版に差し替えたいと思っています。

Can't rendering into `xoops_contents` in non-module

ex. test.php in XOOPS_ROOT_PATH

<?php
require './mainfile.php';
include  XOOPS_ROOT_PATH . '/header.php';

echo '<p>hoge</p>';

include  XOOPS_ROOT_PATH . '/footer.php';

XOOPS 2 has no problem, But XCL is no good.

User Profile Bug.

User Profile Bug.
adding new user on Admin Panel is fail.
Fix the bug.

プロフィールモジュールで項目を追加している場合
管理画面からユーザを追加しようとするとユーザの追加が正常にできないのを修正する。

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.