First time user questions

Help
Mike Crowe
2009-06-01
2013-04-26
  • Mike Crowe

    Mike Crowe - 2009-06-01

    Hi folks,

    Have several issues to pulse the group on:

    1)  I've made $admin_users = array( 'mike' ); in my conf/ directory, but I never see an admin prompt.  Is there a site "admin" screen?  What does that do?

    2)  How do you authorize SVN with a username/password?  I've tried setting:
        svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, '****');
        svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, '****');
    in ResourceTypeSVN() to no avail.

    3)  I'm trying to make the whole site SSL, but am having some places where it bounces back to http.  Is there a flag to force SSL?

    4)  Is there a way to make the whole site private, and require a login?

    TIA
    Mike

     
    • Graham Pitt

      Graham Pitt - 2009-06-01

      Hello,

      1) I've made $admin_users = array( 'mike' ); in my conf/ directory, but I never see an admin prompt. Is there a site "admin" screen? What does that do?

      At the moment it only allows you to delete reviews.  All configuration is done via the files in conf/ at the moment.  In a later release this will likely move to a web based configuration.

      2) How do you authorize SVN with a username/password? I've tried setting:
      svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, '****');
      svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, '****');
      in ResourceTypeSVN() to no avail.

      Are you accessing the resource via https?  If so, and you are using self signed certificates, you need to set the parameter svn_ignore_ssl_verify_errors to true in conf/svn.php.

      3) I'm trying to make the whole site SSL, but am having some places where it bounces back to http. Is there a flag to force SSL?

      The login will redirect back to http if the request originated via http.

      4) Is there a way to make the whole site private, and require a login?

      At the moment the best way is to add a .htaccess file.  Private reviews and requiring login are both features on the to-do list (as is subversion authentication).

      Thanks,

      Graham

       
      • Mike Crowe

        Mike Crowe - 2009-06-01

        Hi Graham,

        Thanks for the response.  Do you mind if I submit patches?

        Followups:

        2)

        > Are you accessing the resource via https? If so, and you are using self signed certificates, you need  to set the parameter svn_ignore_ssl_verify_errors to true in conf/svn.php.

        I have this in my svn.conf now:
        <?php
        // Set this to a required prefix for SVN url's.
        //$svn_prefix = 'http://';
        //$svn_prefix = 'svn://';
        $svn_prefix = 'https://';

        // Automagically transform user input url's here..

        // These urls are transformed on the client using javascript.
        $svn_url_transform = array(
        //  'svn+ssh://' => 'svn://',
        //  'https://' => 'http://'
        );

        // These urls are silently transformed on the server.
        $svn_url_server_transform = array(
        //  'file://' => 'http://'
        );

        // When the subversion url is of one of the following protocols, url encode the request.
        // For subversion clients < 1.5.0, url encode the svn:// protocol too.
        $svn_url_encode_protocols = array(
        //  'svn',
        //      'http',
                'https');

        // Set this to true if you access subversion via an https server with an invalid or
        // self-signed ssl certificate.
        $svn_ignore_ssl_verify_errors = true;
        ?>

        But I'm still getting an invalid Subversion URL.

        3)

        > The login will redirect back to http if the request originated via http.

        'Fraid not.  For some reason, it's giving me this:

        Bad Request

        Your browser sent a request that this server could not understand.
        Reason: You're speaking plain HTTP to an SSL-enabled server port.
        Instead use the HTTPS scheme to access this URL, please.

        the URL is http://review.mydomain.com/ 

        As a side note, I'm also running it on a different port.  I have this in server.php:$server_fqdn="review.mydomain.net:1234"; //$_SERVER['SERVER_NAME'];

        I'll dig into it more

        Mike

         
        • Graham Pitt

          Graham Pitt - 2009-06-01

          Hello Mike,

          Patches are always welcome. 

          for 2), you might want to try a test like this:

          <?php print_r(svn_ls("https://my.svnserver.com/a_repository", -1);?>

          Run it from the command line and you will likely get some more useful output.

          for 3), change the url to https:// at:

          - line 20 in htdocs/login.php
          - line 44 in htdocs/func_auth.php
          - line 84 in htdocs/func_reviews.php

          I'll consider this a bug and fix for the final release 0.9.0 release.

          Thanks,

          Graham

           
          • Mike Crowe

            Mike Crowe - 2009-06-01

            Hi Graham,

            Excellent code, btw.

            Regarding SVN issue, here's what I'm seeing in the groogle.log:

            Jun 01 15:31:38 ResourceTypeSVN [debug] ResourceTypeSVN::get_revision_list url=https://svn.mydomain.com/svn/project/tags/weather0839 max_revision= min_revision=
            Jun 01 15:31:39 ResourceTypeSVN [debug] validate_request_parameters failed because retrieved revisions was empty.

            Where do min_revision/max_revision come from?

             
            • Graham Pitt

              Graham Pitt - 2009-06-01

              Hello,

              If you look at the method definition in htdocs/resource_handler_svn.php min_revision and max_revision are parameters to the get_revision_list method.  They both have a default value of false (i.e. no minimum or maximum revision).  These parameters can be parsed in to apply filtering, for instance, to filter the commit log shown in the file review window in order to show only svn log entries created after the review was raised.

              Did you try the php snippet I provided from the command line?  It'll likely give a stderr log as to why it can't access the repository.  This will hopefully give you a clue as to what is wrong.

               
  • Colintodd Alexandar

    I meet the same error

    Jun 01 15:31:38 ResourceTypeSVN  ResourceTypeSVN::get_revision_list url=https://svn.mydomain.com/svn/project/tags/weather0839 max_revision= min_revision=
    Jun 01 15:31:39 ResourceTypeSVN  validate_request_parameters failed because retrieved revisions was empty.
    Where do min_revision/max_revision come from?

    When I use chrome and ie8 to submit the svn repository,  I fail to get the revision options. I  change the firefox browser, it works. 

     

Log in to post a comment.