Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hi,

ich stehe vor dem Problem, dass ich nicht weiß, welche Datei ich für einen Login ansprechen muss.

Laut den Sourcen des Webservice gibt es folgende Datei, die eine login-Methode bereitstellt: Bugzilla.pm

Auszug:

sub login { 

    my ($class, $type) = @_; 


    return Bugzilla->user if Bugzilla->user->id; 


    my $authorizer = new Bugzilla::Auth(); 

    $type = LOGIN_REQUIRED if Bugzilla->cgi->param('GoAheadAndLogIn'); 

    if (!defined $type || $type == LOGIN_NORMAL) { 

        $type = Bugzilla->params->{'requirelogin'} ? LOGIN_REQUIRED : LOGIN_NORMAL; 

    } 

    my $authenticated_user = $authorizer->login($type); 


    # At this point, we now know if a real person is logged in. 

    # We must now check to see if an sudo session is in progress. 

    # For a session to be in progress, the following must be true: 

    # 1: There must be a logged in user 

    # 2: That user must be in the 'bz_sudoer' group 

    # 3: There must be a valid value in the 'sudo' cookie 

    # 4: A Bugzilla::User object must exist for the given cookie value 

    # 5: That user must NOT be in the 'bz_sudo_protect' group 

    my $sudo_cookie = $class->cgi->cookie('sudo'); 

    detaint_natural($sudo_cookie) if defined($sudo_cookie); 

    my $sudo_target; 

    $sudo_target = new Bugzilla::User($sudo_cookie) if defined($sudo_cookie); 

    if (defined($authenticated_user)                 && 

        $authenticated_user->in_group('bz_sudoers')  && 

        defined($sudo_cookie)                        && 

        defined($sudo_target)                        && 

        !($sudo_target->in_group('bz_sudo_protect')) 

       ) 

    { 

        Bugzilla->set_user($sudo_target); 

        request_cache()->{sudoer} = $authenticated_user; 

        # And make sure that both users have the same Auth object, 

        # since we never call Auth::login for the sudo target. 

        $sudo_target->set_authorizer($authenticated_user->authorizer); 


        # NOTE: If you want to do any special logging, do it here. 

    } 

    else { 

        Bugzilla->set_user($authenticated_user); 

    } 


    return Bugzilla->user; 

} 
Nun habe ich einen kleinen TestClient geschrieben, der auf diese Bugzilla.pm-Datei zugreift:
import java.net.URL; 


import org.apache.axis.Constants; 

import org.apache.axis.client.Call; 

import org.apache.axis.client.Service; 

import javax.xml.namespace.QName; 

import javax.xml.rpc.ParameterMode; 


public class TestClient { 

        public static void main(String[] args) { 

                try { 

                        String endpoint = "-adresse-/Bugzilla.pm"; 


                        Service service = new Service(); 

                        Call call = (Call) service.createCall(); 

                        call.setTargetEndpointAddress(new URL(endpoint)); 

                        call.setOperationName("login"); 

                        call.addParameter("Bugzilla_login", Constants.XSD_STRING, ParameterMode.IN); 

                        call.addParameter("Bugzilla_password", Constants.XSD_STRING, ParameterMode.IN); 

                        call.addParameter("Bugzilla_remember", Constants.XSD_BOOLEAN, ParameterMode.IN); 

                        call.setReturnType(Constants.XSD_BOOLEAN); 

                        Object obj = call.invoke(new Object[]{"myaccount", "password", false}); 

                        System.out.println("OBJ: "+obj.toString()); 

                } catch (Exception e) { 

                        e.printStackTrace(); 

                } 

        } 

}

Bei der Ausführung des Clients erhalte ich die HttpErrorCode:403-Fehlermeldung "You don't have permission to access /Bugzilla.pm".

Ist das die richtige Datei, die ich ansprechen muss? Die Frage stellt sich mir, weil ich im Browser auch folgende Adresse eingeben kann, mit der gleichen Meldung: http://meine-adresse/wetweztssgserzgwerzh.pm

Ich wäre für jeden Vorschlag dankbar.

Bei der Ausführung des Clients erhalte ich die HttpErrorCode:403-Fehlermeldung "You don't have permission to access /Bugzilla.pm".

Ist das die richtige Datei, die ich ansprechen muss? Die Frage stellt sich mir, weil ich im Browser auch folgende Adresse eingeben kann, mit der gleichen Meldung: http://meine-adresse/wetweztssgserzgwerzh.pm

überprüfe mal Die Logs des Webservers, da werden mehr Informationen zu finden sein. ggf diese dann posten. Die Meldung besagt, dass die Zugriffsrechte nicht ausreichen.

Phil

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.