#8 Server scripts revised

open-accepted
nobody
None
5
2010-03-29
2010-03-25
Anonymous
No

I hope these server scripts are more secure than the old ones.
Unfortunately I could't get the synchronization to work properly.
If you want to use them, you will have to change A Note. If you
don't want that, I suggest to disable the server support in the last
version.

Discussion

  • Server scripts

     
    Attachments
  • Trilarion
    Trilarion
    2010-03-29

    Thanks for the patch. Your help is greatly appreciated. I will try to make it work with the current A Note. Did you try it with version 4.2.1, did it work?

     
  • Trilarion
    Trilarion
    2010-03-29

    • status: open --> open-accepted
     
  • anixdorf
    anixdorf
    2010-03-29

    It worked with 4.2.1, but...

    - User management (create user, send password etc.) only works when downloading
    Notes. But I think this is the normal behaviour.

    - Another Situation:
    - Fresh installed A Note.
    - A new username and a new password in the settings.
    - A emtpy database.
    - "Download" selected to create a new user.
    => - "New user dialog" shows and user can be created.
    - User is successfully stored in the database.
    - After that, the "New user dialog" shows again and again.
    - This endless loop can be aborted with some tricks, but from
    then, A Note is in an unusable state.
    - After restarting A Note everything works as expected.

    I suggest, that you install the scripts under http://a-note.sourceforge.net/testsrv, then I can try to debug the SVN Version of A Note and find the incompatibilities.

     
  • Trilarion
    Trilarion
    2010-03-29

    So I am not sure, but it should be working. All your php and inc files are at http://a-note.sourceforge.net/testsrv/.

    The mysql server is mysql-a.sourceforge.net, database is a85069_testsrv and tables info and users are created as given in the text file. The user is a85069rw. Everything written in config.inc. If you need the password, drop me a message. :)

    In phpmyadmin I could choose and Encoding/Kollation. I choose utf8-unicode-ci which seemed most appropriate since I also wanted to have only an unicode A-Note version.

    If you can achieve something, let me know. Also if you want your real name in the contributors list, tell me.

    Tomorrow I also will try to debug the SVN a litte bit. However already at the getversioninfo.php (which is not present in the current package...) something fails. Maybe the encoding... But I have little knowledge... :(

     
  • Trilarion
    Trilarion
    2010-03-29

    Okay, in the last comment several mistakes have been included like debugging the SVN (should read: debug the current code in the SVN). It's quite late here...

     
  • anixdorf
    anixdorf
    2010-04-04

    After a quick debug session with the new scripts and the revision 73 of A Note I think it is the following problem:
    - A Note uses 16-bit (2 byte) character encoding. The server scripts only use 8-bit character encoding.
    - Because of the base64 coded values, the selected database character encoding is not important in my opinion.

    I will have a deeper look at this in the next days.

     
  • anixdorf
    anixdorf
    2010-04-09

    In "CMainFrame::Send" the result of the request is converted. The following
    line throws half of the request answer away: memcpy ((pData + dwTotal - strlen (pTemp)/2), pTemp, strlen (pTemp)/2);

    ---

    The getversion.php script under (http://a-note.sourceforge.net/getversion.php?userid=<<USERID>>)
    is not included in the SVN. Its job was to update the user statistics and to send a message like the following: <version version="4.2.2" text="Update Messagebox Text"/>
    The sql-statement to create the statistic table from the old database.txt:
    CREATE TABLE `allusers` (
    `userid` varchar(100) NOT NULL default '',
    `numberofcalls` int(11) NOT NULL default '0',
    UNIQUE KEY `userid` (`userid`)
    ) TYPE=MyISAM;

    ---

    A Note logs some of the transferred XML Data to ".xml" Files in the user's
    data directory. Most of these files are written in UTF-8, but not the file
    "Get Notes Answer.xml".

     
  • I will upload a new set of server scripts based on this set. Since I can't seem to add a new file to this artifact I'll have to create a new one.